1,105,399 Community Members

Fun with BINARY TREES!!!

Member Avatar
t2nator
Newbie Poster
22 posts since Dec 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I am trying to get a good understanding of what's happening in the following question:

~Given the following numbers in array A ...

47 43 20 24 32 44 35

... what are the numbers that would result from a Pre-Order Traverssal
of the Binary Tree built using the above numbers. Hint: draw the tree.

47 43 20 24 32 35 44 <---- THIS IS THE ANSWER

I have drawn many trees thus far and I am confused as to how nodes are inserted. Are they inserted in a particular order every time? Or are there different ways? I know 47 is root, then there will be 2 child trees under root. What should the tree look like?

Member Avatar
t2nator
Newbie Poster
22 posts since Dec 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Nevermind it finally clicked for me

Question Self-Answered as of 1 Year Ago
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: