LC 110
LeetCode 110 · Easy

Balanced Binary Tree

Return true if the tree is height-balanced.

Tree DP → · Medium frequency · Solve on LeetCode →

Try it

Step through the core mechanic. The simulator below runs the tree dp shape this problem is built on.

Walk the pattern

No dedicated step-through for this one yet. The shape is Tree DP — its pattern page has the interactive walkthrough, the reference implementation, and a five-problem progression that this problem sits inside.

The approach

DFS returns height, or a sentinel −1 once any subtree is found unbalanced. Checking balance and height in one pass beats the naive O(n²) recompute.

AspectValue
PatternTree DP
Recognise it byHeights of siblings differ by ≤ 1 everywhere.
Time complexityO(n)
Space complexityO(h)
DifficultyEasy

Who asks it

Companies known to ask this problem, from public LeetCode company-tag aggregations. A signal of where to expect it, not a guarantee.