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
Notes:1. Even s3 is empty string, if s1 and s2 are emtpy, then it should be true.2. Do not mess up the size of label. 1 class Solution { 2 public: 3 ....
分类:
其他好文 时间:
2015-03-20 06:54:54
阅读次数:
115
题目链接:Text Justification
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 should pack your words in a ...
分类:
其他好文 时间:
2015-03-20 00:06:50
阅读次数:
188
【参阅】http://www.cnblogs.com/jiangzhengjun/p/4260969.html单一职责原则( SRP )——内聚性定义单一职责原则的定义: 就一个类页言,应该仅有一个引起它变化的原因 ( There should never be more than one reas...
分类:
其他好文 时间:
2015-03-19 23:32:43
阅读次数:
154