摘要:
解压缩: tar 解压:x 压缩 c 有gzip属性的:z 产生大量log输出的:v 制定gz压缩包的名字:-f 参考:http://www.cnblogs.com/jyaray/archive/2011/04/30/2033362.html 阅读全文
摘要:
这类问题可以先用递归思考,再反过来想出动态规划的方法。 10. Regular Expression Matching 32. Longest Valid Parentheses 44. Wildcard Matching 72. Edit Distance 97. Interleaving Str 阅读全文
摘要:
121. Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitte 阅读全文
摘要:
lo和hi都是inclusive的。 返回的数组中,index小于j的数都小于等于j,index大于j的数都大于等于j 阅读全文
摘要:
procedure three-way-partition(A : array of values, mid : value): i ← 0 j ← 0 n ← size of A - 1 while j ≤ n: if A[j] < mid: swap A[i] and A[j] i ← i + 阅读全文
摘要:
阅读全文
摘要:
很开心,自己想出来的一道题 There is a list of sorted integers from 1 to n. Starting from left to right, remove the first number and every other number afterward un 阅读全文
摘要:
169. Majority Element Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. Y 阅读全文