Advantages of AVL Trees

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

What is a data structure?

A data structure is a way of organizing data in the computer memory.


What is ADT?
Abstract data type(ADT) is a specification of a set of data and the set of operations that can be
performed on the data.
Example:
associative array
set
stack
queue
tree
Uses of AD:
1. It helps to efficiently develop well designed program
2. facilitaties the decomposition of the complext tast of developing a software system into a number
of simpler subtasks.
Advantages of AVL trees:
1. Search is O(log N) since AVL trees are always balanced.
2. Insertion and deletions are also O(logn)
3. The height balancing adds no more than a constant factor to
the speed of insertion
disadvantages of AVL trees:
1. Difficult to program & debug; more space for balance factor.
2. Asymptotically faster but rebalancing costs time.
3. Most large searches are done in database systems on disk
and use other structures (e.g. B-trees).
4. May be OK to have O(N) for a single operation if total run
time for many consecutive operations is fast (e.g. Splay trees).

You might also like