Draw the Binary Search Tree (BST) we would get if we were to insert the letters C O M P U T E R S in the
order listed (i.e., C is the first letter added to the tree).
Given that BST, what would be the order of the nodes visited in:
1. A pre-order traversal
2. A post-order traversal
3. An in-order traversal
2 Try again
Repeat Question 1, but with the letters S R E T U P M O C
3 And the other way
Draw a binary tree1
that would produce the following results:
What to hand in
You must submit a file called ex3.txt with the answers to questions 1 and 2 in the following format:
That is, questions 1.1 - 2.3 each on their own line, starting with the question number and ending with the
traversal number. One space between the question number and the traversal, no other spaces.
You do not need to submit a solution for question 3 (though you should try it).
Get Free Quote!
274 Experts Online