🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Binary Search Tree Operations: all 15 questions

Quiz: Binary Search Tree Operations · Question 9 of 15

To find the k-th smallest key in a BST, the simplest correct method is to:

To find the k-th smallest key in a BST, the simplest correct method is to:

  1. A.Take the k-th node in level order
  2. B.Do an inorder traversal and stop at the k-th visited key
  3. C.Go left k times from the root
  4. D.Take the k-th node in preorder
Answer & explanation

Correct answer: Do an inorder traversal and stop at the k-th visited key

Inorder visits keys in increasing order, so the k-th visit is the k-th smallest.

Can you get the rest right without peeking?

Take the timed Quiz: Binary Search Tree Operations quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →