A set of n keys k1 kn is to be stored in an initially


A set of n keys: {k1, . . . , kn} is to be stored in an initially empty binary search tree. Which of the following statements is always true?

(A) The resulting binary search tree has the same height, regardless of the order in which the keys are inserted in the tree.

(B) If ki is the largest key, then in every binary search tree storing the above set of keys, the right child of the node storing ki is a leaf.

(C) A preorder traversal of the tree visits the keys in increasing order of value.

(D) After inserting the keys, the key stored at the root of the tree is the same regardless of the order in which the keys are inserted. (E) None of the above statements is always true.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: A set of n keys k1 kn is to be stored in an initially
Reference No:- TGS01683050

Now Priced at $20 (50% Discount)

Recommended (98%)

Rated (4.3/5)