LeetCode226. Invert Binary Tree
来源:互联网 发布:单片机培训网 编辑:程序博客网 时间:2024/05/22 00:47
Invert a binary tree.
4 / \ 2 7 / \ / \1 3 6 9to
4 / \ 7 2 / \ / \9 6 3 1
解法:
TreeNode* invertTree(TreeNode* root) { if(root==NULL) return NULL; TreeNode *temp; temp=root->left; root->left=temp; root->right=temp; invertTree(root->right); invertTree(root->left); return root; }
0 0
- LeetCode226:Invert Binary Tree
- Leetcode226 Invert Binary Tree
- leetcode226 Invert Binary Tree
- LeetCode226. Invert Binary Tree
- leetcode226: Invert Binary Tree
- leetcode226. Invert Binary Tree
- leetcode226. Invert Binary Tree
- python--leetcode226. Invert Binary Tree
- LeetCode226——Invert Binary Tree
- 剑指offer 面试题19:二叉树的镜像(leetcode226. Invert Binary Tree) 题解
- [leetcode] Invert Binary Tree
- [LeetCode]Invert Binary Tree
- Invert Binary Tree
- leetcode:Invert Binary Tree
- Invert Binary Tree
- LeetCode Invert Binary Tree
- 226Invert Binary Tree
- LeetCode | Invert Binary Tree
- PHP扩展类ZipArchive实现压缩解压Zip文件和文件打包下载
- 剑指offer面试题6:重建二叉树
- git常用命令
- 情绪阀门
- 如何用mysql命令行模式导入sql文件
- LeetCode226. Invert Binary Tree
- C/C++中调用外部文件的函数时如何编写头文件
- Android应用开发性能优化完全分析
- VS 2010 的 Cannot find or open the PDB file发生的可能原因
- [uC/OS-II原理及应用]uC/OS-II的中断和时钟
- aoj 31 Counting Sheep
- 添加html元素的事件
- <机器学习笔记-02> <scikit-learn -02>线性回归
- Linux基础学习--忘记root密码找回方法