Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are ...
分类:
其他好文 时间:
2018-10-29 16:05:54
阅读次数:
190
题目 Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally id ...
分类:
其他好文 时间:
2018-10-02 17:39:32
阅读次数:
203
注意null的时候要单独判断 因为不能用val ...
分类:
其他好文 时间:
2018-08-28 22:38:57
阅读次数:
159
100. 相同的树 https://leetcode-cn.com/problems/same-tree/description/ ...
分类:
其他好文 时间:
2018-08-27 10:29:38
阅读次数:
155
We are given the head node root of a binary tree, where additionally every node's value is either a 0 or a 1. Return the same tree where every subtree ...
分类:
其他好文 时间:
2018-08-27 00:18:16
阅读次数:
182
Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are ...
分类:
其他好文 时间:
2018-08-19 19:06:06
阅读次数:
151
这题比较简单,思路和之前做过的Merge Two Trees类似,都是对树的遍历进行简单运用,这里选择的递归的前序遍历。 ...
分类:
其他好文 时间:
2018-07-15 12:04:30
阅读次数:
170
该题是检测两棵树是否一样,主要思路是通过递归的方法对树进行中序遍历,比较简单,直接贴上代码: END ...
分类:
其他好文 时间:
2018-04-18 10:28:44
阅读次数:
158
转载请注明:http://www.cnblogs.com/igoslly/p/8707664.html 来看一下题目: Given two binary trees, write a function to check if they are the same or not. Two binary ...
分类:
其他好文 时间:
2018-04-03 14:20:40
阅读次数:
147
[抄题]: Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally ...
分类:
其他好文 时间:
2018-03-11 11:52:17
阅读次数:
110