
BitManipulation
weixin_39145266
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
187 Repeated DNA Sequences
1 题目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....原创 2019-04-04 23:13:26 · 115 阅读 · 0 评论 -
78 Subsets
1 题目Given a set ofdistinctintegers,nums, return all possible subsets (the power set).Note:The solution set must not contain duplicate subsets.Example:Input: nums = [1,2,3]Output:[ [3]...原创 2019-03-29 09:17:01 · 115 阅读 · 0 评论 -
137 Single Number II
1 题目Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one.Note:Your algorithm should have a linear runtime comp...原创 2019-04-12 17:58:27 · 102 阅读 · 0 评论 -
201 Bitwise AND of Numbers Range
1 题目Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive.Example 1:Input: [5,7]Output: 4Example 2:Input: [0,1]Outpu...原创 2019-04-16 15:13:20 · 108 阅读 · 0 评论 -
260 Single Number III
1 题目Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once.Example:Input: [...原创 2019-04-22 16:39:12 · 91 阅读 · 0 评论 -
397 Integer Replacement
1 题目Given a positive integernand you can do operations as follow:Ifnis even, replacenwithn/2. Ifnis odd, you can replacenwith eithern+ 1orn- 1.What is the minimum number of repla...原创 2019-07-10 22:42:57 · 69 阅读 · 0 评论 -
338 Counting Bits
1 题目Given a non negative integer numbernum. For every numbersiin the range0 ≤ i ≤ numcalculate the number of 1's in their binary representation and return them as an array.Example 1:Input: ...原创 2019-07-06 22:57:20 · 115 阅读 · 0 评论