Computer Science EngineeringHard

In a binary search tree, the inorder successor of a node that has a non-empty right subtree is

  1. A. the leftmost node of its right subtree
  2. B. the root of the whole tree
  3. C. the rightmost node of its left subtree
  4. D. its parent

Correct answer: A. the leftmost node of its right subtree

The next larger key is the minimum of the right subtree, found by going left repeatedly.

More Algorithms, Data Structures & Programming (ISRO CS) questions

Exams that ask this topic