function(name) { var
query=location.search.substring(1); var pairs=query.split("&"); for(var
i=0;i<pairs.length;i++) ...
分类:
其他好文 时间:
2014-05-19 10:43:27
阅读次数:
266
题目:查找元素target插入一个数组中的位置。代码:public int
searchInsert(int[] A, int target) { int len = A.length; int i; for(i = 0 ; i
< len ; i++){ ...
分类:
其他好文 时间:
2014-05-18 20:28:13
阅读次数:
299
数学函数绝对值 abs()圆周率 PI()平方根 sqrt()模除取余
mod(被除数,除数)随机数 rand()四舍五入 round(数字)次方 pow(5,2)e为底的指数函数 exp(数字)字符串函数字符长度
length(字符)字符连接 concat(字符1,字...
分类:
数据库 时间:
2014-05-18 20:05:37
阅读次数:
469
Given a stringS, find the longest palindromic
substring inS. You may assume that the maximum length ofSis 1000, and there
exists one unique longest pa...
分类:
其他好文 时间:
2014-05-18 19:39:55
阅读次数:
355
【题目】
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in place with constant memory.
For example,
Given input array A ...
分类:
其他好文 时间:
2014-05-18 18:25:19
阅读次数:
272
【题目】
Given an array and a value, remove all instances of that value in place and return the new length.
The order of elements can be changed. It doesn't matter what you leave beyond the new length.
【题意】
删除数组中指定的值。不关心在新数组的后面即数组尾部留下了什么值。
【思路】
思路同Remo...
分类:
其他好文 时间:
2014-05-18 14:53:56
阅读次数:
208
【题目】
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters.
For example, given:
S:...
分类:
其他好文 时间:
2014-05-18 08:31:48
阅读次数:
228
创建 Array 对象的语法:var array = []; var array new
Array();var array new Array(size); // length = sizevar array new Array(element0,
element1, ..., elementn)...
分类:
编程语言 时间:
2014-05-18 02:22:39
阅读次数:
314
Given an unsorted array of integers, find the
length of the longest consecutive elements sequence.For example,Given[100, 4,
200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2014-05-18 01:52:45
阅读次数:
317
//扩展方法$.GM.Format = function (source, params) { if
(arguments.length == 1) return function () { var args = $.makeArra...
分类:
Web程序 时间:
2014-05-17 21:49:16
阅读次数:
333