1 11. Give an example of a binary search tree which is a complete tree. Can it be done for an arbitrary number of nodes? Prove your answer. Yes. First, construct complete tree with n nodes. Get the inorder list of the complete tree, say, a1,a2,…an. Let a1 be the smallest number, a2 be second smallest number, and so on. Then, the complete tee obtained is a binary search tree with n nodes. 12. We can sort a given set of n numbers by first building a binary search tree containing
This is the end of the preview. Sign up
access the rest of the document.