Swap Nodes in PairsGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2-...
分类:
其他好文 时间:
2014-07-19 22:25:10
阅读次数:
210
For android system, of course you can custom your own style and theme, but you can't break compatibility with AOSP.We should follow AOSP design, and d...
分类:
其他好文 时间:
2014-07-19 16:22:00
阅读次数:
231
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
其他好文 时间:
2014-07-19 12:13:13
阅读次数:
254
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ 2 5
/ \ 3 4 6
The flattened tree should look like:
1...
分类:
其他好文 时间:
2014-07-19 11:47:54
阅读次数:
168
1. S The Single Responsibility Principle 单一责任原则 当需要修改某个类的时候原因有且只有一个(THERE SHOULD NEVER BE MORE THAN ONE REASON FOR A CLASS TO CHANGE)。换句话说就是让一个类只做一种类....
分类:
编程语言 时间:
2014-07-18 20:21:29
阅读次数:
210
Another recursion-style problem.1. Each count of sub-solution with a certain root should contribute to final count2. With a certain root, the num of l...
分类:
其他好文 时间:
2014-07-18 18:18:01
阅读次数:
187
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:
其他好文 时间:
2014-07-17 22:24:40
阅读次数:
216
执行php-5.3.10
--enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-s...
分类:
其他好文 时间:
2014-07-17 10:33:56
阅读次数:
381
No matter left shift or right shift, the result's sign should always be the same as its left operand.
By default, const numbers in C/C++ is signed.
-Wsign-compare
{
unsigned int j = 3;
...
分类:
其他好文 时间:
2014-07-16 12:59:21
阅读次数:
238
Given a number ‘n’, find the smallest number ‘p’ such that if we multiply all digits of ‘p’, we get ‘n’. The result ‘p’ should have minimum two digits...
分类:
其他好文 时间:
2014-07-16 08:55:04
阅读次数:
208