Post

AVL Tree

✅ Balance factor

difference between heights of the left subtree and right subtree

✅ AVL tree

Self balancing binary search tree
Balance factor for every node is less than or equal to 1

  • caculations to maintain balance factor

How is AVL tree improved compared to BST?

BST can lose balance to one side
AVL tree always maintains balance

https://soheeparklee.github.io/posts/DB-7binarytree/

This post is licensed under CC BY 4.0 by the author.