DATA STRUCTURE
Programming and Technical
Programming
Technical
In binary search tree , n=nodes, h=height of tree.
What's complexity?
1. o(h)
2. o(n*h)
3. o(nLogn)
4. o(n*n)
5. None
Read Solution (Total 9)
-
- 3 0(nlogn)
- 10 years agoHelpfull: Yes(7) No(2)
- O(nlogn)
----->n-1+n-2+...1;
n(n-1)/2 - 10 years agoHelpfull: Yes(3) No(1)
- complexity for the binary search tree is O(log(n)) average
worst case is o(n)
best case is o(n) - 10 years agoHelpfull: Yes(1) No(5)
- none as its complexity varies between O(n) and O(logn)
- 9 years agoHelpfull: Yes(1) No(2)
- O(n log n)
- 10 years agoHelpfull: Yes(0) No(2)
- 1 o(h)
coz h=logn
- 10 years agoHelpfull: Yes(0) No(4)
- bst time complexct is nlogn
- 10 years agoHelpfull: Yes(0) No(2)
- 3 o(nlogn)
- 9 years agoHelpfull: Yes(0) No(2)
- 3. O(nlogn)
n-1+n-2+........4,3,2,1; ==n(n-1)/2 - 6 years agoHelpfull: Yes(0) No(0)
DATA STRUCTURE Other Question