Bit Manipulation: Easy to Hard Problems
Easy
- Single Number (Finds the single number in an array where every other number appears twice)
- Number of 1 Bits (Counts the number of 1 bits in a binary representation of a number)
- Power of Two (Checks if a number is a power of two)
- Reverse Bits (Reverses the bits of a 32-bit unsigned integer)
- Hamming Distance (Calculates the Hamming distance between two integers)
- Missing Number (Finds the missing number in a range using XOR)
- Single Number II (Finds the single number that appears once when others appear thrice)
- Find the Duplicate Number *(Finds the duplicate number in an array using bit manipulation
Medium (continued)
- Find the Duplicate Number (Finds the duplicate number in an array using bit manipulation)
- Bitwise AND of Numbers Range (Finds the bitwise AND of numbers in a given range)
- Total Hamming Distance (Calculates the total Hamming distance between all pairs of numbers in an array)
Hard
- Maximum XOR of Two Numbers in an Array (Finds the maximum XOR of any two numbers in an array)
- Find Minimum XOR Sum of Two Arrays (Finds the minimum XOR sum of two arrays by pairing elements)
- Subsets with Bit Manipulation (Generates all possible subsets using bit manipulation)
- Longest Substring with At Most Two Distinct Characters (Finds the longest substring with at most two distinct characters using bit manipulation)
- Minimum Number of Flips to Convert Binary Matrix to Zero Matrix (Finds the minimum number of flips required to convert a binary matrix to a zero matrix)