🎙 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 12 of 15

How do you delete a node that has exactly one child?

How do you delete a node that has exactly one child?

  1. A.Link its parent directly to that child
  2. B.Replace it with the inorder successor
  3. C.Delete the whole subtree
  4. D.Swap it with the root
Answer & explanation

Correct answer: Link its parent directly to that child

The child's subtree keeps the BST order relative to the parent, so it can take the deleted node's place.

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 →