avl tree

Archived from the original Sajha.com — preserved as posted, replies can no longer be added here.
Start a New Discussion
Archived Post

What is the cost of using AVL tree over Binary search tree?

datamap · Dec 17, 2009 11:46 AM · 12,346 views

1 Reply

IMO, cost of searching AVL has O(log n) in all cases whereas in a sorted heap BST it has O(n), O(log n), and O(1) for Worst, Average, and Best cases.Similarly, for inserting and deleting u need to do it taking a heap or a linked list. This may be ur assignment but dont trust my answer 100%! Rather include 1 example and show the algo analysis in a tree.

Om shauraye namah · Dec 17, 2009 3:26 PM

This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.

Start a New Discussion

You might be interested in...

Recent Classifieds View all
Upcoming Events View all
Service Providers View all