###### Invert Binary Tree

/**
* Definition for a binary tree node.
* struct TreeNode {
*     int val;
*     TreeNode *left;
*     TreeNode *right;
*     TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
TreeNode* invertTree(TreeNode* root)
{
if(root == NULL)
{
return root;
}
TreeNode* tmp = root -> left;
root -> left = invertTree(root -> right);
root -> right = invertTree(tmp);
return root;
}
};

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

2016-05-29 00:18:13

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

2016-05-12 14:36:34

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

2015-06-23 23:53:58

#### leetcode（226）—— Invert Binary Tree（Python/C++）

2016-04-15 14:57:52

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

2015-06-13 14:41:43

#### 226. Invert Binary Tree的C++解法

2017-04-06 10:37:37

#### 1102. Invert a Binary Tree (25)-PAT甲级真题

2016-08-10 20:04:01

#### 【PAT】1102. Invert a Binary Tree (25)

2015-10-24 19:19:54

#### leetcode解题之226# Invert Binary Tree Java版 (交换树的左右子树）

2017-03-19 07:10:55

#### PAT 甲级 1102. Invert a Binary Tree (25)

2017-10-09 15:00:02

## 不良信息举报

Invert Binary Tree