recategorized by
19,140 views
1 votes
1 votes
8. What are the worst case and average case complexities of a binary search tree?
a) O(n), O(n)
b) O(logn), O(logn)
c) O(logn), O(n)
d) O(n), O(logn)
recategorized by

1 Answer

1 votes
1 votes
D: Worst case occurs when BST is skewed O(n);  Best case occurs when it is Height Balanced O(logn)   in case of insertion, search and delete operations

Related questions

0 votes
0 votes
1 answer
3
0 votes
0 votes
0 answers
4
eyeamgj asked Nov 30, 2018
280 views
https://gateoverflow.in/132037/self-doubt-in-binary-search-algoDOUBT : THIS QUESTION 10 ELEMENTS ARE IN ARRAY AND SORTED THEN HOW CAN WE DRAW A BALANCED TREE BECZ IT I...