Given a binary tree, determine if it is height-balanced: a binary tree in which the depth of the two subtrees of every node never differs by more than one.
Input: root = [3,9,20,null,null,15,7]
Output: true
Topics: trees
Asked by: Amazon, Google, Meta
Time complexity: O(n). Space complexity: O(h).