Invert a binary tree (mirror it — every node's left and right children are swapped) and return its root.
Trees in this problem are given and returned as a level-order array: null marks a missing child, and trailing nulls are omitted.
Example:
Input: root = [4,2,7,1,3,6,9]
Output: [4,7,2,9,6,3,1]