⚠️ Please use a computer for the best experience

AVL Trees

Self-balancing binary search tree with automatic rotations to maintain height balance

Time Complexity

OperationAverageWorst Case
InsertO(log n)O(log n)
SearchO(log n)O(log n)
DeleteO(log n)O(log n)
Build from n nodesO(n log n)O(n log n)

Controls

Red node: Last rotation point

h: Height of subtree

Nodes (0)

No nodes yet. Add some above!