Ask your own question, for FREE!
Mathematics 20 Online
OpenStudy (anonymous):

can anyone please help me with binary trees? i might medal you think about it

Nnesha (nnesha):

what tree ??O_O chocolate binary tree

OpenStudy (mimi_x3):

i only know binary trees in comp

OpenStudy (anonymous):

no haha in java:P

OpenStudy (anonymous):

This isn't a question. It's a phrase with a question mark.

OpenStudy (mimi_x3):

what are u trying to code

OpenStudy (anonymous):

is that better?

OpenStudy (anonymous):

Leia, Boba, Darth, R2D2, Han, Luke, Chewy, Jabba write in pre order post order and in order

OpenStudy (anonymous):

Wait, so you have to create a binary tree that will take those values in, sorting them, and then you have it print them out in these orders?

OpenStudy (anonymous):

yea i dont have to write any code tho so its less work hopeuflly

OpenStudy (anonymous):

Okay, why don't you simulate what will happen as you insert them into the tree?

OpenStudy (anonymous):

tbh i have noo cluee

OpenStudy (anonymous):

Okay, So first you insert Leia... it gets put as the root because there is nothing in the tree yet.|dw:1421213325608:dw|

OpenStudy (anonymous):

Next you insert Boba, since Boba comes before in the alphabet, it goes to the left.|dw:1421213362551:dw|

OpenStudy (anonymous):

|dw:1421213375347:dw|

OpenStudy (anonymous):

Next is Darth, where would it go?

OpenStudy (anonymous):

idk i never learnt how to do this :(

OpenStudy (anonymous):

Does it go before or after Leia?

OpenStudy (anonymous):

after

OpenStudy (dan815):

.. alphabetical order

OpenStudy (anonymous):

are u sure?

OpenStudy (dan815):

i dont know how u wanna order it

OpenStudy (bibby):

how else would you order strings...

OpenStudy (mimi_x3):

|dw:1421214806526:dw|

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!