AVL Trees
Last updated
What is AVL Trees?
An AVL tree is a type of binary search tree that is self-balancing, which means the heights of the two child subtrees of any node in the tree differ by at most one. If at any point the difference becomes greater than one, rebalancing is done to restore the property. The tree is named after its inventors, G.M. Adelson-Velsky and E.M. Landis, who introduced it in 1962. Each node in an AVL tree carries extra information (its Balance Factor) which could be either -1, 0, or +1. AVL trees balance themselves by rotating sub-trees in different manners(named as Left-Left rotation, Right-Right rotation, Left-Right rotation, and Right-Left rotation) whenever an insert operation causes the balance factor to go beyond this range.
Free resources to learn AVL Trees
More in stage 11: Advanced Data Structures
- Advanced Data Structures
- Trie
- Segment Trees
- Fenwick Trees
- Disjoint Set (Union-Find)
- Suffix Trees and Arrays
- Binary Trees
- Tree Traversal
- Search Algorithms
- Binary Search Trees
- In-Order Traversal
- Breadth First Search
- Pre-Order Traversal
- Depth First Search
- B-Trees
- Heap
- Post-Order Traversal
- Search Algorithms
- Breadth First Search
- Depth First Search
- Shortest Path Algorithms
- Dijkstra's Algorithm
- Bellman-Ford Algoritm
- A* Algorithm
- Minimum Spanning Tree
- Prim's Algorithm
- Kruskal's Algorithm
AVL Trees: common questions
Can I learn AVL Trees in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain AVL Trees in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this AVL Trees tutorial for beginners?
It is lesson 64 of 107 in the free Data Structures & Algorithms roadmap, in stage 11, Advanced Data Structures. If you are new to Data Structures & Algorithms, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.