Algorithm Visualizer

Interactive learning with AI, JWT & SSL/TLS

50

AVL Tree

Self-balancing binary search tree where the height difference between left and right subtrees cannot be more than 1. Uses rotations to maintain balance after insertions and deletions.

Time Complexity

Insert: O(log n)

Space Complexity

O(n)

Balance Info

Height values shown below each node. Balance factor = height(left) - height(right), must be -1, 0, or 1.