var formateNumArr = function(arr,defaultVal){ var a = []; $.each(arr,function(i,v){ if(!isNaN(v)){ a.push(v); }else{ a.push(defaultVal); arr[i...
分类:
其他好文 时间:
2014-10-14 10:09:55
阅读次数:
140
Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another ex...
分类:
其他好文 时间:
2014-10-14 09:49:07
阅读次数:
219
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled u...
分类:
其他好文 时间:
2014-10-14 08:29:27
阅读次数:
270
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You shoul...
分类:
其他好文 时间:
2014-10-14 07:58:57
阅读次数:
237
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
//第一种解法
class Solution {
pub...
分类:
其他好文 时间:
2014-10-13 23:41:27
阅读次数:
393
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /.
Each operand may be an integer or another expression.
Some examples:
["2", "1",...
分类:
编程语言 时间:
2014-10-13 20:33:47
阅读次数:
231
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
You have the following 3 operations permitted on a word:...
分类:
其他好文 时间:
2014-10-13 20:08:07
阅读次数:
188
From the JavaScript Reference onMDC,~ (Bitwise NOT)Performs the NOT operator on each bit. NOTayields the inverted value (a.k.a. one’s complement) ofa....
分类:
编程语言 时间:
2014-10-13 17:03:39
阅读次数:
159
遍历:$('#queryUser2 input[type="checkbox"]:checked').each( function () { a = a + $(this).v...
分类:
Web程序 时间:
2014-10-13 16:26:29
阅读次数:
209
DescriptionGiven a triangle ABC, the Extriangles of ABC are constructed as follows:On each side of ABC, construct a square (ABDE, BCHJ and ACFG in the...
分类:
其他好文 时间:
2014-10-13 14:38:59
阅读次数:
442