Input: root = [1,2,2,3,3,null,null,4,4]
Explanation:
Starting from the bottom:
Both 4s are leaf nodes → height = 1.
Each 3 has one child (4) → height = 2 and is balanced.
Left 2 has left height = 2 and right height = 2 → balanced, height = 3.
Right 2 is a leaf → height = 1.
Root 1 has:
Left subtree height = 3
Right subtree height = 1
Height difference = 2
Since 2 > 1, the root is not balanced.