Results 1 to 8 of 8
 04112012, 06:31 PM #1Senior Member
 Join Date
 Oct 2011
 Posts
 115
 Rep Power
 0
Binary Search Tree (traversals) Question
Here is the question:
1.)Draw the tree that would be formed by inserting the words in this question into a binary search tree. Use lowercase letters.
Here's what I have:
Binary search tree with 22 words will have only 20 words as the and tree are repeated...I believe this is correct
2.) Show all three traversals of this tree.
Inorder:
a binary by be draw formed in letters lowercase into question search inserting that the this tree use words would
Preorder:
draw be a by binary the that formed inserting in question into lowercase letters search tree this would words use
Postorder:
a binary by be formed in letters lowercase into search question inserting that this use words would tree the draw
or
draw the tree would words use this that formed inserting question search into lowercase letters be by binary a
Does it look like I'm doing this correctly?
 04112012, 06:36 PM #2
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,017
 Blog Entries
 7
 Rep Power
 23
 04112012, 06:39 PM #3Senior Member
 Join Date
 Oct 2011
 Posts
 115
 Rep Power
 0
Re: Binary Search Tree (traversals) Question
Doing the problems...does the tree look correct. And then for part 2, do my traversals of that tree look correct?
 04112012, 06:42 PM #4
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,017
 Blog Entries
 7
 Rep Power
 23
 04112012, 06:45 PM #5Senior Member
 Join Date
 Oct 2011
 Posts
 115
 Rep Power
 0
Re: Binary Search Tree (traversals) Question
For part 2 you have to take the words off the tree in a certain order based on what traversal it is. I Google'd each and after readin what they were supposed to do I implemented it on my tree. However, I'm not sure if they are correct.
 04112012, 06:48 PM #6
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,017
 Blog Entries
 7
 Rep Power
 23
Re: Binary Search Tree (traversals) Question
Show us your implementation of the different traversals.
kind regards,
JosI have the stamina of a seal; I lie on the beach instead of running on it.
 04112012, 07:00 PM #7Senior Member
 Join Date
 Oct 2011
 Posts
 115
 Rep Power
 0
 04112012, 07:20 PM #8
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,017
 Blog Entries
 7
 Rep Power
 23
Similar Threads

Binary search tree
By hansmoolman in forum New To JavaReplies: 2Last Post: 10282010, 01:59 PM 
Data Structures(Binary Search Tree to AVL Tree)ASAP pls
By jfAdik in forum Forum LobbyReplies: 0Last Post: 04042010, 07:40 AM 
Binary search tree search method
By chopo1980 in forum New To JavaReplies: 2Last Post: 12102009, 02:42 AM 
Binary Tree Traversals and Swapping
By Sylar in forum New To JavaReplies: 0Last Post: 03082009, 08:52 AM 
Binary Search Tree
By Goo in forum New To JavaReplies: 0Last Post: 03062009, 05:46 PM
Bookmarks