The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
107 views
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)
in Programming by Active (1.2k points) | 107 views
0
For which operation? Searching?

1 Answer

+1 vote
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
by Active (1.6k points)
0
Yes answer would be d

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,339 questions
55,765 answers
192,354 comments
90,815 users