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

Keys 1, 2, 3, 4, 5 are inserted in that order into an empty plain BST. What is the height of the tree?

Keys 1, 2, 3, 4, 5 are inserted in that order into an empty plain BST. What is the height of the tree?

  1. A.2
  2. B.4
  3. C.3
  4. D.5
Answer & explanation

Correct answer: 4

Each key goes to the right of the previous one, making a chain of 5 nodes with 4 edges. Search becomes O(n).

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 →