What is your approach to solving a binary tree problem?
Implement analyze_tree(root) for a binary tree. Return a two-element array containing the tree height and whether the tree is height-balanced. A tree is balanced when the heights of every node's left and right subtrees differ by at most one.
Represent each node as an object with value, left, and right fields. An empty child is null. The height of an empty tree is 0, and a leaf has height 1.
def analyze_tree(root):