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-03-21 16:54:40
阅读次数:
126
题目‘?’ Matches any single character.
‘*’ Matches any sequence of characters (including the empty sequence).The matching should cover the entire input string (not partial).The function prototype should...
分类:
编程语言 时间:
2015-03-21 12:43:07
阅读次数:
190
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9, 4 ],
[...
分类:
其他好文 时间:
2015-03-21 12:41:11
阅读次数:
105
In order to work effectively with multithreaded code, it’s important to have the basic facts about monitors and locks at your command. This checklist contains the main facts that you should know: ...
分类:
编程语言 时间:
2015-03-21 11:24:52
阅读次数:
189
今天使用git 第一次使用,在使用git push时报错 No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as ‘master‘. fatal: The remote end hung up unexpectedly er...
分类:
其他好文 时间:
2015-03-20 19:02:34
阅读次数:
163
problem:
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant spa...
分类:
其他好文 时间:
2015-03-20 18:37:47
阅读次数:
123
http://stackoverflow.com/questions/2628672/what-should-every-javascript-programmer-knowNot jQuery. Not YUI. Not (etc. etc.)Frameworks may be useful, b...
分类:
编程语言 时间:
2015-03-20 16:17:58
阅读次数:
177
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5,
and A is now [1,1,2,2,...
分类:
其他好文 时间:
2015-03-20 11:00:03
阅读次数:
92
Here is the doc for the important idea about the
floating points powered by oracle
doc. website
http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
Abstract:
Floating-point ar...
分类:
其他好文 时间:
2015-03-20 09:24:33
阅读次数:
167
Corner case: when all the elements are 0. It should return "0", not "00000000".It use string to compare all the numbers. 1 class Solution { 2 public: ...
分类:
其他好文 时间:
2015-03-20 06:58:14
阅读次数:
109