![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
bitManipulation
文章平均质量分 63
伊萨卡钢琴家
这个作者很懒,什么都没留下…
展开
-
Leetcode 136. Single Number
Leetcode 136. Single NumberGiven an array of integers, every element appears twice except for one. Find that single one.This question is so intended to examine about the bit manipulation, beca原创 2016-01-21 14:17:18 · 374 阅读 · 0 评论 -
Leetcode 137. Single Number II
Single Number IIGiven an array of integers, every element appears three times except for one. Find that single one.Analysis: given a integer, there could be 32 positions in a Integer. If the原创 2016-01-22 03:47:22 · 333 阅读 · 0 评论 -
Leetcode 190. Reverse Bits
190. Reverse BitsReverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represent原创 2016-01-22 04:22:27 · 363 阅读 · 0 评论 -
Leetcode 260. Single Number III
Single Number IIIGiven 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.原创 2016-01-22 04:08:34 · 293 阅读 · 0 评论 -
Leetcode 231. Power of Two
Given an integer, write a function to determine if it is a power of two.public class Solution { public boolean isPowerOfTwo(int n) { return (n > 0) && ((n & (n - 1)) == 0); }}Analy原创 2016-01-22 04:48:46 · 286 阅读 · 0 评论 -
Leetcode 268. Missing Number
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given nums = [0, 1, 3] return 2Analysis: This question is a原创 2016-01-22 04:56:50 · 244 阅读 · 0 评论 -
Leetcode 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.You may assume that the array is non-empty and the majority element原创 2016-01-22 05:05:46 · 344 阅读 · 0 评论 -
Leetcode Bit Manipulation 题型总结
Leetcode136. Single Number https://leetcode.com/problems/single-number/137. Single Number II https://leetcode.com/problems/single-number-ii/260. Single Number III https://leetcode.com/proble原创 2016-01-25 12:56:17 · 353 阅读 · 0 评论 -
Leetcode 187. 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原创 2016-01-27 00:41:03 · 269 阅读 · 0 评论