码迷,mamicode.com
首页 >  
搜索关键字:same-tree    ( 180个结果
Same Tree
简单题ref“使用的是先序遍历,算法的复杂度跟遍历是一致的,如果使用递归,时间复杂度是O(n),空间复杂度是O(logn)。” by codegankerhttp://blog.csdn.net/linhuanmars/article/details/22839819?Time to search ...
分类:其他好文   时间:2015-06-10 06:32:13    阅读次数:104
Symmetric Tree
有个问题,就是不能和same tree一样光看root 做recursive而是必须比较左右节点,因为对称是指整个树否则就会出现 1 2 2 # 3 3public class Solution { public boolean isSymmetric(TreeNode root) { ...
分类:其他好文   时间:2015-06-10 06:31:42    阅读次数:104
[LeetCode][Java]Same Tree
https://leetcode.com/problems/same-tree/Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are consi...
分类:编程语言   时间:2015-05-16 18:07:57    阅读次数:130
【Same Tree】cpp
题目:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical...
分类:其他好文   时间:2015-05-15 09:01:13    阅读次数:145
LeetCode 100: Same Tree
Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 分析: 题目要求判...
分类:其他好文   时间:2015-05-14 14:19:07    阅读次数:124
Same Tree -- leetcode
Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 基本思路: 进行递...
分类:其他好文   时间:2015-05-05 19:44:08    阅读次数:107
Same Tree
题目Given two binary trees, write a function to check if they are equal or not. 分析写一个检查两个二叉树是否相等的函数...
分类:其他好文   时间:2015-05-04 22:16:06    阅读次数:114
【LeetCode OJ】Same Tree
题目:Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 解题思路:这题...
分类:其他好文   时间:2015-05-02 16:36:20    阅读次数:104
【LeetCode OJ】Same Tree
题目:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical...
分类:其他好文   时间:2015-05-02 16:32:51    阅读次数:116
Same Tree
https://leetcode.com/problems/same-tree/Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equ...
分类:其他好文   时间:2015-05-02 13:38:23    阅读次数:137
180条   上一页 1 ... 10 11 12 13 14 ... 18 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!