We use two Bind server to realize view, master, slave-------------------------------------------------------------------------------------------------...
分类:
其他好文 时间:
2014-07-22 22:57:13
阅读次数:
299
描述:不使用 * / % 完成除法操作。O(n)复杂度会超时,需要O(lg(n))复杂度。代码: 1 class Solution: 2 # @return an integer 3 def dividePositive(self, dividend, divisor): 4 ...
分类:
其他好文 时间:
2014-07-16 19:18:00
阅读次数:
298
1. 定义http://en.wikipedia.org/wiki/Adapter_patternAn adapter helps two incompatible interfaces to work together. This is the real world definition for ...
分类:
其他好文 时间:
2014-07-16 19:01:47
阅读次数:
345
nilNilNULLNSNullnil: A null pointer to an Objective-Cobject. ( #define nil ((id)0) )nil 是一个对象值。Nil: A null pointer to an Objective-Cclass.NULL: A null...
分类:
移动开发 时间:
2014-07-16 18:10:14
阅读次数:
271
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
[1,4],
]...
分类:
其他好文 时间:
2014-07-16 17:27:32
阅读次数:
139
Search and Replace
Sublime Text features two main types of search:
Search - Single FileSearch - Multiple Files
We’ll examine them in turn, but first let’s talk about a powerful tool for searc...
分类:
其他好文 时间:
2014-07-16 16:18:52
阅读次数:
312
A delegate is a type that safely encapsulates a method, similar to a function pointer in C and C++. Unlike C function pointers, delegates are object-o...
分类:
其他好文 时间:
2014-07-16 15:43:31
阅读次数:
228
Repost from:http://blog.csdn.net/yutianzuijin/article/details/11499917这是我做的第二个leetcode题目,一开始以为和第一个一样很简单,但是做的过程中才发现这个题目非常难,给人一种“刚上战场就踩上地雷挂掉了”的感觉。后来搜了一下...
分类:
其他好文 时间:
2014-07-16 15:19:06
阅读次数:
244
Ultra-QuickSort
Description
In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence eleme...
分类:
其他好文 时间:
2014-07-16 09:00:13
阅读次数:
240
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