Suppose you insert elements 41, 38, 31, 12, 11, 50, 55 and 22 (one by one) in an original empty BST tree. Indicate if an
Posted: Mon May 02, 2022 11:49 am
Suppose you insert elements 41, 38, 31, 12, 11, 50, 55 and 22
(one by one) in an original empty BST tree.
Indicate if any of the four alternative trees shown in the
figure below is the resulting correct BST tree and if so, indicate
which.
Correct answer is:
None of the trees are correct.
Tree 1
Tree 3
Tree 4
Tree 2
Träd 1 Träd 2 41 31 38 50 12 41 31 55 11 22 38 50 12 5 55 11 22 Träd 3 Träd 4 41 41 38 50 31 50 12 31 55 12 38 55 11 22 11 22
(one by one) in an original empty BST tree.
Indicate if any of the four alternative trees shown in the
figure below is the resulting correct BST tree and if so, indicate
which.
Correct answer is:
None of the trees are correct.
Tree 1
Tree 3
Tree 4
Tree 2
Träd 1 Träd 2 41 31 38 50 12 41 31 55 11 22 38 50 12 5 55 11 22 Träd 3 Träd 4 41 41 38 50 31 50 12 31 55 12 38 55 11 22 11 22