top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is an AVL tree in datastructure?

+3 votes
411 views
What is an AVL tree in datastructure?
posted Mar 31, 2015 by Jalal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

An AVL tree is a type of binary search tree that is always in a state of partially balanced.

The balance is measured as a difference between the heights of the subtrees from the root.

This self-balancing tree was known to be the first data structure to be designed as such.

In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is done to restore this property. Lookup, insertion, and deletion all take O(log n) time in both the average and worst cases, where n is the number of nodes in the tree prior to the operation. Insertions and deletions may require the tree to be rebalanced by one or more tree rotations.

answer Apr 2, 2015 by Mohammed Hussain
Similar Questions
+2 votes

write c# code about AVL tree contains :
1. add node
2. delete node
3. balance
4. replace node
and then print nodes from left leave !

...