Invert Binary Tree
来源:互联网 发布:尚德科技 互助平台源码 编辑:程序博客网 时间:2024/05/22 08:04
题目链接地址
// Definition for a binary tree node.class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } }public class Solution { public TreeNode invertTree(TreeNode root) { if(root!=null) { TreeNode temp; temp = root.left; root.left = root.right; root.right = temp; invertTree(root.left); invertTree(root.right); }return root; }}
0 0
- [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
- leetcode--Invert Binary Tree
- [leetcode] Invert Binary Tree
- [LeetCode] Invert Binary Tree
- LeetCode Invert Binary Tree
- Invert Binary Tree
- leetcode : Invert Binary Tree
- 226Invert Binary Tree
- Invert Binary Tree
- [LeetCode] Invert Binary Tree
- [Leetcode]Invert Binary Tree
- 子串和
- 两天学会DirectX 3D之入门
- 欢迎使用CSDN-markdown编辑器
- 对于机器学习的入门和进阶,您有哪些好的建议?
- 超级台阶
- Invert Binary Tree
- AVL平衡二叉树打印树模型测试
- 『HTML5梦幻之旅』 - 仿Qt示例Drag and Drop Robot(换装机器人)
- Java - Thinking in Java 第1章 对象导论
- ocp 053第448题
- 入门指南 (Scala)
- 01串
- 内存对齐
- sql server