AVL Trees

What is an AVL Tree?

An AVL tree is a self-balancing binary search tree. It is named after inventors Adelson-Velsky and Landis. The tree automatically keeps itself balanced to ensure fast operations.

Key Properties

AVL trees have many important properties:

Rotations

AVL trees use rotations to stay balanced. There are four types:

  1. Left Rotation
  2. Right Rotation
  3. Left-Right Rotation
  4. Right-Left Rotation

Visual Example

AVL Tree diagram

An AVL tree showing balance factors at each node.

Learn More

For more information about AVL trees:

AVL Tree Tutorial on GeeksforGeeks