GATE CS 2015, set 1 · Question 35 · Programming and Data Structures · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
- (A) θ(log n) for both insertion and deletion
- (B) θ(n) for both insertion and deletion
- (C) θ(n) for insertion and θ(log n) for deletion
- (D) θ(log n) for insertion and θ(n) for deletion
Answer
Answer (B)
Answer from the official GATE CS 2015 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes