Question

Imagine a set implementation which uses heaps, instead of binary search trees. How would the performance...

Imagine a set implementation which uses heaps, instead of binary search trees. How would the performance of such a data structure differ from the actual implementation of AVL tree?

0 0
Add a comment Improve this question Transcribed image text
Answer #1
A set which is using heap implementation takes O(log n) for insert operation but it takes O(n) for searching for an item.
but with AVL implementation of a set, it only takes O(log n) for insert, search, delete operations.

so, using AVL implementation for a set, improves it's performances in regards to searching for items in set.
Add a comment
Know the answer?
Add Answer to:
Imagine a set implementation which uses heaps, instead of binary search trees. How would the performance...
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