位运算
nicaishibiantai
这个作者很懒,什么都没留下…
展开
-
Bitwise AND of Numbers Range
Given a range [m, n] where 0 For example, given the range [5, 7], you should return 4. 核心就是求m 和n的最高位是否在一个位置上。我们把n的所有低位置零,只剩下最高位,然后&m。结果或者是两个的最高位,或者是0. public int rangeBitwiseAnd(int m, i原创 2015-04-26 07:07:42 · 356 阅读 · 0 评论 -
Repeated DNA Sequences
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-04-28 05:24:07 · 396 阅读 · 0 评论