Given a binary tree, return true if it is height-balanced -- meaning at EVERY node, the heights of its left and right subtrees differ by at most 1.
Think of it like a mobile hanging from the ceiling. A well-balanced mobile hangs level at every crossbar, not just at the top. If one branch is loaded with ornaments while the other is nearly bare, the crossbar tilts -- and that tilt compounds downward. A “balanced” binary tree has the same property: at every single node, the left and right sides must be within one level of each other in depth. The tricky part is that “every single node” clause. A tree can look perfectly symmetric at the root and still hide a devastating imbalance three levels down -- the crossbar at the top hangs level, but a crossbar deep inside is about to snap. Your checker needs to inspect every crossbar, not just the one you can see from the doorway.
What does “balanced” actually mean for a binary tree? Look at this tree carefully -- every subtree matters.
Is this tree balanced? Take a moment -- look at every node, not just the root.