Combination Sum
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen from C unl...
分类:
其他好文 时间:
2015-08-21 17:10:33
阅读次数:
151
All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within the DNA.
Wri...
分类:
其他好文 时间:
2015-08-19 00:36:15
阅读次数:
140
我们首先来看字母 ”A" "C" “G" "T" 的ASCII码,分别是65, 67, 71, 84,二进制表示为 1000001, 1000011, 1000111, 1010100。可以看到它们的后三位是不同,所以用后三位就可以区分这四个字母。一个字母用3bit来区分,那么10个字母用30bit就够了。用int的第29~0位分表表示这0~9个字符,然后把30bit转化为int作为这个子串的key,放入到HashTable中,以判断该子串是否出现过。...
分类:
其他好文 时间:
2015-08-12 11:44:46
阅读次数:
109
genericizing-codePrefer functionality over implementationIt’s never too late to refactorWatch out for repeated code across different typesOne protocol...
分类:
其他好文 时间:
2015-08-06 01:57:55
阅读次数:
104
All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to ...
分类:
其他好文 时间:
2015-08-03 00:51:18
阅读次数:
157
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where
the candidate numbers sums to T.
The same repeated number may be chosen from C unlimited numb...
分类:
其他好文 时间:
2015-07-25 20:00:54
阅读次数:
138
本文是对一篇英文论文的总结:Finding Repeated Elements。想看原文,请Google之。这个问题的简单形式是“查找出现次数大于n/2的重复元素”。我们先从简单问题开始,然后再做扩展。1.查找出现次数大于n/2的重复元素 《编程之美》中有同样的一道题《寻找发帖水王》,具体思路是每....
分类:
其他好文 时间:
2015-07-23 17:27:18
阅读次数:
155
android:interpolatorInterpolator 被用来修饰动画效果,定义动画的变化率,可以使存在的动画效果accelerated(加速),decelerated(减速),repeated(重复),bounced(弹跳)等。android中的文档内容如下:AccelerateDece...
分类:
移动开发 时间:
2015-07-21 16:50:20
阅读次数:
267
1.5 Implement a method to perform basic string compression using the counts of repeated characters. For example, the string aabcccccaaa would become a...
分类:
其他好文 时间:
2015-07-17 07:07:29
阅读次数:
134
问题Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen from C unlimited number of...
分类:
其他好文 时间:
2015-07-14 22:38:27
阅读次数:
162