We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,344 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Fun with BINARY TREES!!!

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?

1
Contributor
1
Reply
1 Hour
Discussion Span
5 Months Ago
Last Updated
2
Views
Question
Answered
t2nator
Newbie Poster
20 posts since Dec 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Nevermind it finally clicked for me

t2nator
Newbie Poster
20 posts since Dec 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
Question Self-Answered as of 5 Months Ago

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0781 seconds using 2.69MB