Make a mirror image of a binary tree. To do this, swap the left child and the right child of every node. Return the new tree.
How the judge passes the data
Examples
Example 1:
Input: root = [5,3,8,1,4,7,9]
Output: [5,8,3,9,7,4,1]
Explanation: Every node swaps its two children. The left side of the old tree becomes the right side.
Example 2:
Input: root = [6,2,9]
Output: [6,9,2]
Explanation: The children 2 and 9 swap places.