leetcode 226. Invert Binary Tree
来源:互联网 发布:关于孙悟空的网络歌曲 编辑:程序博客网 时间:2024/05/21 19:32
/** * 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) { TreeNode p = root; if (p==null) return p; TreeNode tmp = invertTree(p.left); p.left = invertTree(p.right); p.right = tmp; return p; }}
0 0
- LeetCode 226. Invert Binary Tree
- [leetcode] 226.Invert Binary Tree
- [leetcode] 226. Invert Binary Tree
- 【LeetCode】226. Invert Binary Tree
- leetCode 226. Invert Binary Tree
- LeetCode #226. Invert Binary Tree
- [LeetCode]226. Invert Binary Tree
- 226. Invert Binary Tree LeetCode
- LeetCode 226. Invert Binary Tree
- LeetCode 226. Invert Binary Tree
- leetcode:226. Invert Binary Tree
- LeetCode 226. Invert Binary Tree
- [LeetCode]226. Invert Binary Tree
- leetcode 226. Invert Binary Tree
- 【LeetCode】226. Invert Binary Tree
- #leetcode#226. Invert Binary Tree
- LeetCode *** 226. Invert Binary Tree
- leetcode: 226. Invert Binary Tree
- lcd常用接口
- 电商平台运营8步总结
- Mutations
- Action通配符使用
- [LeetCode] 115. Distinct Subsequences
- leetcode 226. Invert Binary Tree
- 数据绑定之 Source, RelativeSource和ElementName的不同
- 记我的学习之路
- Node.js http模块 设置响应头
- 微软雅黑Monaco字体——听说是最适合编程的字体
- Openjudge 1.8 25:螺旋加密
- JAVA中编码格式问题
- Spring基础:在WebApplicationContext创建前和创建后调用方法
- AFN上传多张图片到服务器