码迷,mamicode.com
首页 >  
搜索关键字:same-tree    ( 180个结果
Same Tree
/** * Definition for binary tree * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */bool isSameTree(...
分类:其他好文   时间:2015-03-10 22:44:42    阅读次数:144
[LeetCode] 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 an...
分类:其他好文   时间:2015-03-10 16:57:12    阅读次数:121
leetcode 100.Same Tree
leetcode 100.Same Tree
分类:其他好文   时间:2015-03-02 18:49:10    阅读次数:116
【LeetCode从零单排】No100 Same Tree && No101 Symmetric Tree
题目1.same treeGiven 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.2.sym...
分类:其他好文   时间:2015-03-02 16:51:53    阅读次数:135
leetcode_100_Same Tree
欢迎大家阅读参考,如有错误或疑问请留言纠正,谢谢  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 ...
分类:其他好文   时间:2015-02-16 14:19:42    阅读次数:98
Leetcode#100 Same Tree
原题地址基本模拟题代码:1 bool isSameTree(TreeNode *p, TreeNode *q) {2 if (p && q)3 return p->val == q->val && isSameTree(p->left, q->left) &&...
分类:其他好文   时间:2015-02-02 12:19:56    阅读次数:82
100.Same Tree
#pragma once #include #include using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; bool isSameTree(TreeNode...
分类:其他好文   时间:2015-01-30 09:11:06    阅读次数:214
LeetCode-Same Treet
题目链接:https://oj.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 equal if they are structurally i...
分类:其他好文   时间:2015-01-30 09:07:15    阅读次数:177
36: Same Tree
/************************************************************************/ /* 36: Same Tree */ /****************************************************.....
分类:其他好文   时间:2015-01-27 23:14:26    阅读次数:195
Same Tree
https://oj.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 ...
分类:其他好文   时间:2015-01-13 14:14:55    阅读次数:125
180条   上一页 1 ... 12 13 14 15 16 ... 18 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!