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

What is the time complexity of searching a balanced BST with n keys?

What is the time complexity of searching a balanced BST with n keys?

  1. A.O(1)
  2. B.O(n)
  3. C.O(log n)
  4. D.O(n log n)
Answer & explanation

Correct answer: O(log n)

Each comparison moves one level down, and a balanced tree has about log₂ n levels.

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 →