Given a binary tree, determine if it is height-balanced. A height-balanced binary tree is defined as a binary tree in which the left and right subtrees of every node differ in height by no more than 1.
Recursive Height Tracker
A tree is balanced if: (1) Its left subtree is balanced, (2) Its right subtree is balanced, and (3) The difference between the heights of the left and right subtrees is at most 1. We can combine these checks into a single recursive function that returns the height of the subtree if it's balanced, or -1 if it's not.