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 cons...
分类:
其他好文 时间:
2015-07-04 15:35:29
阅读次数:
123
class Solution:
# @param {integer} numerator
# @param {integer} denominator
# @return {string}
def fractionToDecimal(self, numerator, denominator):
negativeFlag = numerator * d...
分类:
其他好文 时间:
2015-07-04 15:33:35
阅读次数:
105
class Solution:
# @param {string} s
# @return {string[]}
def findRepeatedDnaSequences(self, s):
ans = []
valCnt = dict()
map = {'A' : 0, 'C' : 1, 'G': 2, 'T' : 3}
...
分类:
其他好文 时间:
2015-07-04 15:33:25
阅读次数:
106
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input:Digit st...
分类:
其他好文 时间:
2015-07-04 14:02:10
阅读次数:
282
反汇编一个简单的C程序并分析C 源码:int g(int x)
{
return x+1;
}int f(int x)
{
return g(x);
}int main(void)
{
return f(2) + 3;
}
汇编源码:1 g:
2 pushl %ebp
3 movl %esp, %ebp
4 movl 8(%ebp), %eax
5...
分类:
其他好文 时间:
2015-07-04 09:42:05
阅读次数:
132
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2015-07-04 00:44:40
阅读次数:
132
1 class Solution { 2 public: 3 /** 4 * @param A: An integer array. 5 * @param B: An integer array. 6 * @return: a double whose for...
分类:
编程语言 时间:
2015-07-04 00:41:07
阅读次数:
143
1. Question给一个数字字符串,按照电话上各个数字对应的字母,返回该字符串代表的所有可能的字母组合。Given a digit string, return all possible letter combinations that the number could represent.A ...
分类:
其他好文 时间:
2015-07-03 23:23:10
阅读次数:
121
Given numRows, generate the first numRows of Pascal’s triangle.For example, given numRows = 5,
Return[
——-[1],
——[1,1],
—-[1,2,1],
—[1,3,3,1],
–[1,4,6,4,1]
]题目:根据numRows生成帕斯卡三角形。帕...
分类:
其他好文 时间:
2015-07-03 20:46:45
阅读次数:
137
/**?
???*?得到几天前的时间?
???*?@param?d?
???*?@param?day?
???*?@return?
???*/??
??public?static?Date?getDateBefore(Date?d,int?day){??
???Calendar?now?=Ca...
分类:
编程语言 时间:
2015-07-03 17:37:16
阅读次数:
142