码迷,mamicode.com
首页 >  
搜索关键字:invertbinarytree    ( 2个结果
LeetCode226 InvertBinaryTree Java题解
题目: Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 解答: 遍历每个节点 直接交换他们的左右节点 代码: public static TreeNode invertTree(TreeNode ...
分类:编程语言   时间:2017-05-04 14:38:24    阅读次数:150
LeetCode226 InvertBinaryTree Java题解
题目: Invert a binary tree. 4 / 2 7 / \ / 1 3 6 9 to 4 / 7 2 / \ / 9 6 3 1 解答: 遍历每一个节点  直接交换他们的左右节点 代码: public static TreeNode invertTr...
分类:编程语言   时间:2015-07-06 17:57:58    阅读次数:163
2条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!