原题地址:http://oj.leetcode.com/problems/binary-tree-level-order-traversal/题意:二叉树的层序遍历的实现。解题思路:二叉树的层序遍历可以用bfs或者dfs来实现。这里使用的dfs实现,代码比较简洁。实际上,二叉树的先序遍历就是dfs实...
分类:
编程语言 时间:
2014-05-14 03:25:59
阅读次数:
428
Pat1018代码
题目描述:
There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to an...
分类:
其他好文 时间:
2014-05-13 23:27:04
阅读次数:
582
原题地址:http://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/题意:Given
a binary tree, return thebottom-up level ordertraversal of its node...
分类:
编程语言 时间:
2014-05-12 22:03:27
阅读次数:
581
原题地址:http://oj.leetcode.com/problems/binary-tree-zigzag-level-order-traversal/题意:Given
a binary tree, return thezigzag level ordertraversal of its nod...
分类:
编程语言 时间:
2014-05-12 22:02:26
阅读次数:
480
**Why can I access private variables in the
copy constructor?** >The access modifiers work on **class level**, and not on
object level.That is, two ob...
分类:
编程语言 时间:
2014-05-12 15:06:06
阅读次数:
315
下面是它们的英文定义:A northbound interface is an
interface that conceptualizes lower level details. It interfaces to higher level
layers and is normally drawn ...
分类:
其他好文 时间:
2014-05-12 10:43:29
阅读次数:
296
3.依赖倒置原则:High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.
意思是:高...
分类:
其他好文 时间:
2014-05-11 22:15:36
阅读次数:
326
从Android3.0(API Level 11)开始,Android 2D渲染管道能够更好的支持硬件加速。硬件加速执行的所有的绘图操作都是使用GPU在View对象的画布上来进行的。因为启用硬件加速会增加资源的需求,因此这样的应用会占用更多的内存。
启用硬件加速的最容易的方法是给整个应用程序都打开全局硬件加速功能。如果应用程序只使用标准的View和Drawable,那么打开全局硬件加速不会导致任...
分类:
移动开发 时间:
2014-05-11 15:08:17
阅读次数:
450
Problem DescriptionIn 2100, since the sea level
rise, most of the cities disappear. Though some survived cities are still
connected with others, but m...
分类:
其他好文 时间:
2014-05-10 07:33:38
阅读次数:
265
Pat1076代码
题目描述:
Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with foll...
分类:
其他好文 时间:
2014-05-10 04:50:24
阅读次数:
403