edited by
1,335 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?

edited by

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

Related questions

0 votes
0 votes
1 answer
2
srestha asked May 2, 2019
563 views
$A)$ Rotation operation of AVL tree always preserves the inorder numbering.$B)$ If every node of BST has either $0$ or $2$ children , then searching time is $O(log n)$Whi...
0 votes
0 votes
0 answers
3
Overflow04 asked Oct 2, 2022
303 views
Not able to understand the last option.
9 votes
9 votes
5 answers
4
target2017 asked Jan 7, 2017
3,089 views
How it is 24? I'm not getting it.