Question

The time-complexity of searching an AVL tree is in the worst case and in the average case. On), On) O(logot). O(log O ON), C(
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. (B) O(log2n), O(log2n)

The worst case and average case time complexity of Searching in AVL trees is O(log2n). It is a binary search tree with height difference of left and right sub tree of any node can not be more than 1.

2. (A) O(n), O(log2n)

The worst case complexity of binary search tree is O(n) since height can be equal to number of nodes since all nodes can be in same sub tree side in worst case and the time complexity is O(h) where h is height of tree. In average case, the time complexity is O(log2n)

Add a comment
Know the answer?
Add Answer to:
The time-complexity of searching an AVL tree is in the worst case and in the average...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT