in DS edited by
1,311 views
0 votes
0 votes

Assume a Binary Search Tree is not allowed to have duplicates, there is more than one way to delete a node in the tree when the node has two children.If we resolve the situation in favor of choosing element for replacement from left substructure, then which one of the following is true about replacement element?

  1. Largest node in left subtree
  2. Smallest node in right subtree
  3. Both

I know it is predecessor node, but can it be successor too ??

“If we resolve the situation in favor of choosing element for replacement from left substructure” what this line exactly means?

in DS edited by
by
1.3k views

1 Answer

0 votes
0 votes
I think Left substructure denotes left sub tree

Hence, Option A is correct as Option B involves choosing from Right Subtree