← All problems
Balanced Binary Tree
Determine if a binary tree is height-balanced (children's heights differ by at most 1 everywhere).
Complexity
Time O(n), Space O(h)
Common pitfalls
- O(n^2) repeated depth computation
- Only checking the root
Your solution
Log in to save your code and track progress.