Question
If n elements are sorted in a balanced BST. What would be the asymptotic complexity to search a key in the tree?A. $\mathrm{AO}(1)$B. $O(\log n)$C. $\mathrm{O}(\mathrm{n})$D. $\mathrm{O}(\mathrm{nlogn})$
Step 1
A balanced BST is a binary search tree where the height of the left and right subtrees of any node differ by at most 1, and both subtrees are also balanced BSTs. Show more…
Show all steps
Your feedback will help us improve your experience
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD