What are the complexities of the insert, remove and search methods of a binary search tree in the worst case?

(A) insert is O(n), remove is O(n), search is O(n)

(B) insert is O(log n), remove is O(log n), search is O(n)

(C) insert is O(log n), remove is O(log n), search is O(log n)

(D) insert is O(log n), remove is O(log n), search is O(1)

(E) These methods can’t be defined on a binary search tree

Correct Answer is A.

@anupriya .. C is average case and not worst case….check it on wikipedia…

### Question stats

Question and answer is powered by AnsPress