class Solution:
# @param {integer[]} nums
# @return {integer}
def firstMissingPositive(self, nums):
Length = len(nums)
for i in range(Length):
while nums[i] != ...
分类:
其他好文 时间:
2015-06-23 17:50:39
阅读次数:
100
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?Hid...
分类:
其他好文 时间:
2015-06-23 17:39:41
阅读次数:
140
1.作为命名空间的函数。形如: var someFn = (function(){var a = 0;return function f(){// ...};}());2. 闭包。 闭包内无法直接访问外部函数的参数,除非将外部的实参列给一个变量存储以来。例如:var outerArguments =...
分类:
编程语言 时间:
2015-06-23 17:26:46
阅读次数:
134
document.oncontextmenu=function(){ return false }
分类:
Web程序 时间:
2015-06-23 17:23:59
阅读次数:
159
-(NSString *)ret32bitString
{
char data[32];
for (int x=0; x 32; data[x++]
= (char)('A' + (arc4random_uniform(26))));
return [[NSString
alloc] initWithBytes:data
length:32
...
分类:
其他好文 时间:
2015-06-23 15:46:09
阅读次数:
83
/** *浏览器判断 */function getExplorer() { var explorer = window.navigator.userAgent; if (isIE()){ return "IE"; } //firefox else if (explorer.indexOf("Fi.....
分类:
其他好文 时间:
2015-06-23 15:16:23
阅读次数:
85
/*** 去空格*/String.prototype.trim=function(){ return this.replace(/(^\s*)|(\s*$)/g, "");};/** *去左空格 */String.prototype.ltrim=function(){ return this.re....
分类:
Web程序 时间:
2015-06-23 15:08:22
阅读次数:
174
function(value, rowData, rowIndex){return 'rowData.name +value';}formatter:function(value, rowData, rowIndex){return ''+rowData.name +value+'';}format...
分类:
其他好文 时间:
2015-06-23 14:57:55
阅读次数:
152
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.
Calling next() will return the next smallest number in the BST.
Note: next()...
分类:
其他好文 时间:
2015-06-23 13:38:01
阅读次数:
103
代码接第(5)章:
/**
* 读取资源信息
*
* @param filePath
* 资源路径(包含文件名称)
* @return Properties [返回类型说明]
* @see [类、类#方法、类#成员]
*/
private Properties readProperties(String filePath) {
Properties p...
分类:
其他好文 时间:
2015-06-23 13:37:54
阅读次数:
108