← 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?
- A.O(1)
- B.O(n)
- C.O(log n)
- 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 →