Binary Search Tree Allow Duplicates However Let Us Consider Binary Search Tree Allow Dupli Q37142787

For a binary search tree that did not allow for duplicates.However, let us now consider a binary search tree that did allowfor duplicate entries. In this new version of binary search treeyou place the duplicate of an entry in the entry’s rightsubtree.

(a) What is an advantage and a disadvantage of the aboveapproach i.e., placing all the duplicate entry on the rightsubstree of the binary search tree?

(b) Suppose that we change the definition of a binary searchtree so that the duplicate of an entry can be in either the entry’sright subtree or its left subtree. If we choose the subtreerandomly, what

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.