← 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?
- A.2
- B.4
- C.3
- 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 →