Question: (NEED TO SOLVE 'D' and 'E') Question 4: (a) Draw a complete Binary Search Tree that contains the 14 nodes of values:A,B,D,G,H,J,K,M,P,R,T,V,X,andZ. (1mark) (b) Give
(NEED TO SOLVE 'D' and 'E') Question 4: (a) Draw a complete Binary Search Tree that contains the 14 nodes of values:A,B,D,G,H,J,K,M,P,R,T,V,X,andZ. (1mark)
(b) Give one possible order in which these nodes should be inserted to produce the Binary Search Tree drawn in part (a) above. (1 mark)
(c) How many Binary Search Trees of minimum height can contain the same 14 nodes as in part (a)? Justify your answer i.e., explain your reasoning clearly. Note that there is no need to draw the various solutions. (2 marks)
(d) How many solutions are there in part (a)? Use part (c) to justify. (1 mark)
(e) In general, how many Binary Search Trees of N nodes are there? Note that you
will need to do some research, as the answer is far from trivial. (1 mark)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
