Suggest an editImprove this articleRefine the answer for “What is an AVL tree, and what makes it balanced?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**An AVL tree** is a self-balancing binary search tree (BST) in which the height balance of subtrees is controlled for every node. **Key point:** this guarantees that search, insertion, and deletion run in O(log n), while the tree's structure stays "dense".Shown above the full answer for quick recall.Answer (EN)Image**An AVL tree** is a **self-balancing binary search tree (BST)** in which the **height balance of subtrees** is controlled for every node. It is named after its inventors, **Adelson-Velsky and Landis (AVL)**. --- ## Main balancing property For **every node**, the difference between the heights of its left and right subtree is no more than **1**: [ |height(left) - height(right)| \leq 1 ] If this balance is broken after an insertion or deletion, the tree automatically **performs a rotation** to restore the balance. --- ## Why this matters Thanks to this condition, the height of an AVL tree always stays around **O(log n)**, so all operations, search, insertion, deletion, run fast. --- ## Example ```javascript Before insertion: 30 / 20 / 10 After balancing: 20 / \ 10 30 ``` The tree performs a **right rotation** to restore balance. --- ## Main types of rotations 1. **Right Rotation** - when the imbalance is in the left subtree. 2. **Left Rotation** - when the imbalance is in the right subtree. 3. **Left-right** and **right-left** - for more complex cases. --- ## Summary **An AVL tree** is a binary search tree in which a nearly ideal height balance is maintained after every operation. This guarantees that **search, insertion, and deletion run in O(log n)**, while the tree's structure stays "dense" and efficient.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.