solution
rescursive
class Solution:
def mirrorTree(self, root: TreeNode) -> TreeNode:
def helper(node):
if not node:
return
left = helper(node.left)
right = helper(node.right)
node.left = right
node.right = left
return node
return helper(root)