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 n...
分类:
其他好文 时间:
2014-06-19 12:49:17
阅读次数:
301
之前有跟大家分享设置Tab风格和Item圆角的实现,希望能给有需要的朋友一点点帮助,今天再和大家分享一下用ViewPager实现设置分页,小米和OPPO就是这样的设置,先来看看效果图:
为了帮助大家更清晰的理解,我单独拿出一个小例子,有需要的朋友可以下载下来看看:
http://git.oschina.net/way/SettingTab/tree/master
其实要实现...
分类:
移动开发 时间:
2014-06-19 12:14:21
阅读次数:
439
题目
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
...
分类:
其他好文 时间:
2014-06-19 11:46:47
阅读次数:
277
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
分类:
其他好文 时间:
2014-06-19 11:23:05
阅读次数:
204
题目
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
...
分类:
其他好文 时间:
2014-06-19 10:05:39
阅读次数:
278
String对象提供的方法用于处理字符串及字符。常用的一些方法:charAt(index):返回字符串中index处的字符。indexOf(searchValue,[fromIndex]):该方法在字符串中寻找第一次出现的searchValue。如果给定了fromIndex,则从字符串内该位置开始搜...
分类:
编程语言 时间:
2014-06-13 17:42:30
阅读次数:
293
关于tarjan的思想可以在网上搜到,具体我也不太清楚,应该说自己理解也不深,下面是做题经验得到的一些模板。其中有很多转载,包括BYVoid等,感谢让我转。。。望各路大神愿谅有向图求连通分量的一般方法:
1 void Tarjan(u) { 2 dfn[u]=low[u]=++index 3...
分类:
其他好文 时间:
2014-06-13 16:14:11
阅读次数:
395
Path Sum:Given a binary tree and a sum, determine
if the tree has a root-to-leaf path such that adding up all the values along the
path equals the giv...
分类:
其他好文 时间:
2014-06-13 16:09:02
阅读次数:
237
Given a binary tree, flatten it to a linked
list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:
其他好文 时间:
2014-06-13 15:11:35
阅读次数:
273