Bit Manipulation
Binary tricks with AND, OR, XOR and shifts.
17 problems
| Status | Title | Tags | Acceptance | Difficulty |
|---|---|---|---|---|
| 1. Power of Two | Bits | — | Easy | |
| 2. Gray Code | Bits · Recursion | — | Medium | |
| 3. Count Set Bits | Bits | — | Easy | |
| 4. Set Bits for 0..N | Bits · DP | — | Easy | |
| 5. The Single Number | XOR | — | Easy | |
| 6. Single Number Among Triples | Bits | — | Medium | |
| 7. Reverse Bits | Bits | — | Easy | |
| 8. Hamming Distance | XOR | — | Easy | |
| 9. Total Hamming Distance | Bits · Counting | — | Medium | |
| 10. Find the Duplicate Number | XOR · Cycle Detection | — | Medium | |
| 11. Sum of All Subset XORs | Bits · Combinatorics | — | Medium | |
| 12. Bitwise AND of a Range | Bits | — | Medium | |
| 13. Power of Four | Bits | — | Easy | |
| 14. Maximum XOR of Two Numbers | Trie · Bits | — | Hard | |
| 15. Bits to Flip | XOR | — | Easy | |
| 16. Two Numbers with Odd Counts | XOR | — | Medium | |
| 17. Add Binary | Math | — | Easy |
17 of 17 problems