Bit Manipulation Concepts | Bit Manipulation Tricks
Single Number: Single Number ^ | Single Number II | Single Number III
Missing Number: Missing Number *! | Missing Number II
Number of 1 bits:
- Number of 1 Bits *! | Reverse Bits *! | Counting Bits *
- Is Unique | Hamming Distance | Total Hamming Distance | Binary Watch |
- Binary Number with Alternating Bits | Prime Number of Set Bits in Binary Representation
Operations on Two Integers:
- Sum of Two Integers *! | Subtract Two Integers | Divide Two Integers !
- Multiply two integers | Swap two numbers
Power of
- Power of Two | Power of Three ! | Power of Four |
- Highest power of 2 less than or equal to given number |
- Smallest power of 2 greater than or equal to n
Misc:
- Valid Sudoku ^! | Subsets ! | Find the Duplicate Number *!
- Complement of Base 10 Integer | Repeated DNA Sequences |
- Maximum Product of Word Lengths | Binary Gap | Gray Code |
- UTF-8 Validation | Maximum XOR of Two Numbers in an Array |
- Maximum XOR With an Element From Array
- Bitwise AND of Numbers Range | Bitwise OR of Numbers Range
- Check if the Sentence Is Pangram