Given the root of a binary tree, invert the tree and return its root. Inverting means swapping left and right children at every node. The result is a mirror image.
Example: becomes . This is famously the problem that inspired a Homebrew developer to tweet about failing a Google interview.
Despite its simplicity, it tests whether you understand tree recursion. Constraints: up to nodes, values from to .