← All problems

Balanced Binary Tree

Easy treesrecursion LeetCode ↗
Determine if a binary tree is height-balanced (children's heights differ by at most 1 everywhere).

Hints (0/3 revealed)

Log in to reveal hints progressively.

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.