GATE Exam | Aptitude Questions | GATE Syllabus | GATE Result | Mock Test | GATE Preparation
0 votes

In delete operation of BST, we need inorder successor (or predecessor) of a node when the node to be deleted has both left and right child as non-empty. Which of the following is true about inorder successor needed in delete operation?

A

Inorder Successor is always a leaf node

B

Inorder successor is always either a leaf node or a node with empty left child

C

Inorder successor may be an ancestor of the node

D

Inorder successor is always either a leaf node or a node with empty right child

asked in trees, binary search trees, binary heaps by gate

1 Answer

0 votes
B

Inorder successor is always either a leaf node or a node with empty left child
answered by gate

Related questions

The best answer to any question