In the delete operation of a BST, we need the inorder successor (or…
PYQ Capgemini Hiring Assessment 2024
In the delete operation of a BST, we need the inorder successor (or predecessor) of a node when the node being deleted has both its left and right children non-empty. Which of the following is true about the inorder successor needed in the delete operation?
- A.
Inorder successor is always a leaf node
- B.
Inorder successor is always either a leaf node or a node with an 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 an empty right child
Attempted by 98 students.
Sign up free to check your answer
Sign up freeLoading lesson…

