
public class _226InvertBinaryTree {

}

@@ -30,11 +30,442 @@
 yTree %7B%0A
+%09public TreeNode invertTree(TreeNode root) %7B%0A        if (root == null) return null;%0A        if (root.left != null) invertTree(root.left);%0A        if (root.right != null) invertTree(root.right);%0A        TreeNode tmp;%0A        tmp = root.left;%0A        root.left = root.right;%0A        root.right = tmp;%0A        return root;%0A    %7D%0A%0A%09public class TreeNode %7B%0A%09%09int val;%0A%09%09TreeNode left;%0A%09%09TreeNode right;%0A%09%09TreeNode(int x) %7B val = x; %7D%0A%09%7D
 %0A%7D%0A

Add 226 solution