AVL Tree

An AVL tree is a self-balancing binary search tree where the heights of the two child subtrees of any node differ by at most one. If at any time they differ by more than one, rebalancing is done to restore this property.

Time Complexity:

  • Search: O(log n)
  • Insert: O(log n)
  • Delete: O(log n)

Use the controls above to perform operations on the AVL tree. The tree will automatically rebalance itself when needed.