I was told to invert the binary tree , like inverting [1,2,3] to [1,3,2].
when i input
if root == None: return None root.left = root.right # i should use a temp node to help instead map(self.invertTree,(root.left,root.left)) return root
clearly it's wrong.so it invert [1,2,3] to [1,2,3].
However it just accepted.