码迷,mamicode.com
首页 >  
搜索关键字:same-tree    ( 180个结果
LeetCode:same_tree题解
给定两个二叉树,编写一个函数来检查它们是否相等或为空树。 如果两个二叉树被认为是相等的,那么它们在结构上是相同的,并且任意节点具有相同的值。...
分类:其他好文   时间:2014-10-04 00:12:55    阅读次数:219
leetcode_num3_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. 刷题打卡中...
分类:其他好文   时间:2014-09-18 16:33:24    阅读次数:205
Same Tree
[leetcode]Same Tree...
分类:其他好文   时间:2014-09-10 12:33:00    阅读次数:183
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. 解决...
分类:其他好文   时间:2014-09-01 15:40:33    阅读次数:146
38. Same Tree && Symmetric Tree
思想: 构造其镜像树。
分类:其他好文   时间:2014-08-27 20:32:18    阅读次数:310
leetcode 之 Symmetric Tree 镜像树
Symmetric Tree...
分类:其他好文   时间:2014-08-26 11:40:45    阅读次数:235
Same Tree
问题:判断两棵二叉树是否相等class Solution {public: bool isSameTree(TreeNode *p, TreeNode *q) { if(!( (p && q && p->val==q->val) || (p==NULL && q==NULL)))...
分类:其他好文   时间:2014-08-01 22:58:12    阅读次数:195
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. 解题思路:...
分类:其他好文   时间:2014-08-01 13:48:11    阅读次数:183
Same Tree leetcode java
题目: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 identica....
分类:编程语言   时间:2014-07-31 02:24:15    阅读次数:211
#Leet Code# Same Tree
语言:Python描述:使用递归实现 1 # Definition for a binary tree node 2 # class TreeNode: 3 # def __init__(self, x): 4 # self.val = x 5 # self...
分类:其他好文   时间:2014-07-09 20:46:34    阅读次数:168
180条   上一页 1 ... 15 16 17 18 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!