Given the root of a binary tree, mirror it by swapping the left and right children of every node. Return the root of the mirrored tree.
Your function receives root as a TreeNode (or the empty tree, as null) and returns the root of the mirrored tree. The node type is provided for you, with val, left and right fields; you may mirror in place and return the same root.
The examples below write trees as their level-order traversal, where null marks a missing child of a listed node and trailing nulls are omitted. That is only how trees are displayed; the encoding and decoding are done for you.
Node.val ≤100