Skip to content
StackDecode
TreesExplained

Balanced Binary Tree

Check at every node that child heights differ by at most 1.

Time

O(n)

Extra space

O(h)

Use it for

Validating AVL-style balance.

An animated walkthrough for this algorithm isn’t built yet. The summary above explains the idea; see the related animated algorithms below to practise the same technique.