Skip to content

cg342/AVL-Tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

##AVL Tree

###This is a self-balancing binary search tree

According to Wikipedia, an AVL tree , named after inventors Adelson-Velsky and Landis is a self-balancing binary search 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.

BalanceFactor = Heigh of Right Subtree - Height of Left subtree

Insertion

Whenever a node insertion happens, the tree rotates based on the BalanceFactor, thereby adding the new node to the best place where the tree is most balanced.

Rotation

There are two types of rotations - single rotation and double rotation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published