摘要: 解压缩: tar 解压:x 压缩 c 有gzip属性的:z 产生大量log输出的:v 制定gz压缩包的名字:-f 参考:http://www.cnblogs.com/jyaray/archive/2011/04/30/2033362.html 阅读全文
posted @ 2017-02-16 02:55 Gryffin 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 这类问题可以先用递归思考,再反过来想出动态规划的方法。 10. Regular Expression Matching 32. Longest Valid Parentheses 44. Wildcard Matching 72. Edit Distance 97. Interleaving Str 阅读全文
posted @ 2017-01-22 13:07 Gryffin 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-01-18 04:17 Gryffin 阅读(177) 评论(0) 推荐(0) 编辑
摘要: lo和hi都是inclusive的。 返回的数组中,index小于j的数都小于等于j,index大于j的数都大于等于j 阅读全文
posted @ 2017-01-05 08:49 Gryffin 阅读(426) 评论(0) 推荐(0) 编辑
摘要: 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 + 阅读全文
posted @ 2017-01-05 08:13 Gryffin 阅读(777) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-01-04 10:27 Gryffin 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 很开心,自己想出来的一道题 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 阅读全文
posted @ 2017-01-04 08:40 Gryffin 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2016-12-31 00:11 Gryffin 阅读(360) 评论(0) 推荐(0) 编辑
摘要: 找到环的起点。 一快一慢相遇初,从头再走再相逢。 阅读全文
posted @ 2016-12-30 15:20 Gryffin 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 137. Single Number II Given an array of integers, every element appears three times except for one. Find that single one. Note:Your algorithm should h 阅读全文
posted @ 2016-12-30 15:19 Gryffin 阅读(253) 评论(0) 推荐(0) 编辑