Invert Binary Tree

Given the root of a binary tree, swap the left and right child of every node and return the root of the inverted tree.

Examples
Input: [4,2,7,1,3,6,9]
Output: [4,7,2,9,6,3,1]
Hints
Related Problems

Invert Binary Tree

Given the root of a binary tree, swap the left and right child of every node and return the root of the inverted tree.