Math, asked by nayanashetty916, 6 months ago

If a node having two children is to be deleted from binary search tree, it is replaced by its

Only one Option is correct. Choose the same. Please note there is Negative Marking for wrong answers.
1. None of the above
2. In-order predecessor
3. In-order successor
4.Pre-order predecessor​

Answers

Answered by krithikaselvaraj9918
2

Answer:

The answer is 2. In-order successor

Answered by manishad
0

Answer:

If a node having two children is to be deleted from binary search tree, it is replaced by its 3. In-order successor

Step-by-step explanation:

What is binary search tree:

  • The Binary Search Tree data structure is a node-based binary tree with the following properties:
  1. Only nodes with keys lower than the node's key are found in the left subtree of a node.
  2. Only nodes with keys bigger than the node's key are found in the right subtree of a node.
  3. Each subtree on the left and right must be a binary search tree.

What is In-order successor:

  • In a Binary Search Tree, an input node's Inorder Successor can also be defined as the node with the least key greater than the input node's key.
  • As a result, it's occasionally necessary to locate the next node in sorted order.
Similar questions