• edited by
1,650 views
0 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?

1 Answer

0 0 votes
I think Left substructure denotes left sub tree

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

Related questions

3 3 votes
3 3 answers
2.0k
2.0k views
srestha asked May 6, 2019
1,987 views
There is given a infix expression: ${\color{Red} {1}}$$A+B\times C/\left ( \left ( D+E \right )+F\times G \rig...
0 0 votes
1 answers 1 answer
930
930 views
srestha asked May 2, 2019
930 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...
3 3 votes
2 2 answers
447
447 views
ShivankXD asked Jan 8
447 views
A hash table of size 11 using the hash function h(x)=x mod 11 and quadratic probing with hi(x)=(h(x)+i^2)  mod 11 , i∈{0,1,2,…,10}.The key values are given in the followi...
2 2 votes
1 answers 1 answer
281
281 views
ShivankXD asked Jan 8
281 views
Which of the following is/are dynamic data structure?A) Linked listB) StackC) ArrayD) Binary tree