位操作
Frontier_Setter
这个作者很懒,什么都没留下…
展开
-
[LeetCode] (medium) 201. Bitwise AND of Numbers Range
https://leetcode.com/problems/bitwise-and-of-numbers-range/ Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. Example 1:...原创 2019-03-04 19:30:38 · 126 阅读 · 0 评论 -
[小技巧]找到数集中出现次数不同的数
转载自:https://leetcode.com/problems/single-number-ii/discuss/43296/An-General-Way-to-Handle-All-this-sort-of-questions. this kind of question the key idea is design a counter that record state. the ...转载 2019-03-03 14:42:50 · 127 阅读 · 0 评论 -
[LeetCode] (medium) 260. Single Number III Medium
https://leetcode.com/problems/single-number-iii/ Given an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements...原创 2019-03-21 13:14:06 · 159 阅读 · 0 评论 -
[LeetCode] (medium) 338. Counting Bits
https://leetcode.com/problems/counting-bits/ Given a non negative integer numbernum. For every numbersiin the range0 ≤ i ≤ numcalculate the number of 1's in their binary representation and retu...原创 2019-04-04 18:21:17 · 107 阅读 · 0 评论