题目:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 3
...
分类:
编程语言 时间:
2015-07-20 23:43:46
阅读次数:
199
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2015-07-20 18:38:42
阅读次数:
93
---恢复内容开始---DescriptionThe figure shown on the left is left-right symmetric as it is possible to fold the sheet of paper along a vertical line, drawn ...
分类:
其他好文 时间:
2015-07-18 15:28:00
阅读次数:
143
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2015-07-15 10:42:31
阅读次数:
111
Question:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: ...
分类:
其他好文 时间:
2015-07-14 17:08:38
阅读次数:
69
??
Symmetric Tree Total Accepted:
61440 Total Submissions:
194643
My Submissions
Given a binary tree, check whether it is a mirror of itself (ie, symmetric ar...
分类:
其他好文 时间:
2015-07-10 00:29:44
阅读次数:
157
题目要求判断最长的回文,有两种思路可供选择。
思路一,从两头进行判断,定义两个指针start_index和end_index分别指向头部和尾部,首先固定start_index,让end_index从最后一个元素向前遍历,直到碰到start_index,其间对start_index到end_index的范围进行回文判断,回文判断的规则很简单,如果start和end指向的元素一样,回文长度length=2,然后start+1,end-1,继续比较,如果符合则继续+2,直到start<end不再满足,注意在这之中...
分类:
其他好文 时间:
2015-07-09 14:34:42
阅读次数:
89
Symmetric Tree 题目链接 题目要求: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary ...
分类:
其他好文 时间:
2015-07-08 12:36:31
阅读次数:
170
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2015-07-07 18:44:59
阅读次数:
83
题目:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 3
...
分类:
编程语言 时间:
2015-07-06 21:48:44
阅读次数:
139