Bit manipulation
Important concepts
- AND, OR, XOR
- Left shift, right shift
- Bit masks
- Set/clear/toggle bit
- Count set bits
- Find missing number
- Power of two
- Single number problem
Problems to practice
- Single Number
- Number of 1 Bits
- Missing Number
- Bitwise AND of Range
- Reverse Bits
Interview guidance
Bit manipulation is common in low-level optimization and tricky interview problems.
Can you explain it without the notes?
Bit manipulation
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Important concepts
Turn this concept into a clear answer.
Practice this conceptAdapted from 14_DSA_MASTER.md · “14. Bit manipulation”. Examples are study fragments; framework behavior can depend on your version.