# Invert Binary Tree

/**
* Definition for a binary tree node.
* public class TreeNode {
*     int val;
*     TreeNode left;
*     TreeNode right;
*     TreeNode(int x) { val = x; }
* }
*/
public class Solution {
public TreeNode invertTree(TreeNode root) {
if (root == null){
return root;
}
TreeNode temp = root.right;
root.right = root.left;
root.left = temp;
invertTree(root.right);
invertTree(root.left);
return root;
}
}

#### 226. Invert Binary Tree [easy] (Python)

2016-05-12 14:36:34

#### 【LeetCode】226. Invert Binary Tree 解题报告

2016-05-29 00:18:13

#### leetcode 226 Invert Binary Tree 翻转二叉树

2015-06-23 23:53:58

#### Leetcode 226: Invert Binary Tree(二叉树反转 递归、非递归实现)

2015-06-13 14:41:43

#### PAT_A 1102. Invert a Binary Tree (25)

2016-10-23 10:19:12

#### C#版 - 226. Invert Binary Tree(剑指offer 面试题19) - 题解

2018-06-10 15:56:23

#### 1102 Invert a Binary Tree

2016-02-25 16:49:43

#### Invert Binary Tree 递归

2016-05-15 16:45:56

#### Lintcode175 Invert Binary Tree solution 题解

2017-12-11 18:43:43

#### 1102.Invert a Binary Tree (25)

2017-03-03 22:43:28