COMP1927 13s1 COMP1927 13s1 Final Exam Computing 2
[Instructions] [C language]
[Q1] [Q2] [Q3] [Q4] [Q5] [Q6] [Q7] [Q8] [Q9]

Question 6 (7 marks)

Consider inserting the following keys into an initally empty binary search tree in the order specified:

15  30  35  8  25  22  3  21  10  11  

Determine the final tree that would be constructed (you do not need to draw this tree anywhere, except as rough working in your exam booklet). Show the order that key values would be be displayed if we traversed the tree in each of the following orders:

  1. Prefix (NLR) order

  2. Postfix (LRN) order

  3. Level order

Type the answer to this question into the file called q6.txt and submit it using the command:

submit q6