Bit ManipulationΒΆ
How To: Bit Manipulation
Single number
Single number II
Reverse bits
Number of 1 bits
Return the bitwise AND of all numbers in the range
Determine if integer is a power of two
Find the two elements that appear only once
Find missing number
Find the maximum value of length(word[i])*length(word[j])
Power of 4
Sum of 2 integers without +/- operators
Find the difference between strings
UTF-8 validation
Binary Watch
Minimal Abbreviation
Maximum XOR of 2 numbers
Hamming distance between 2 integers
Minimum number of moves required to make all array elements equal
Find the numbers: occurs twice and missing
Binary number with alternating bits
Prime number of set bits in binary representation
Binary gap
Bitwise ORs of subarrays
XOR queries of a subarray
Minimum flips to make a OR b equal to c
Number of steps to reduce a number to zero