Tag: bit-manipulation
Interview Questions
- Even or odd set bits for every number up to n
- Total set bits across 1..n
- Hamming distance between two integers
- Strip and isolate the lowest set bit for every number up to n
- Count set bits for every number up to n
- Saturating 32-bit addition
- Average two signed integers without overflow
- Find the missing sequence number with XOR
- Find the injected order id with XOR
- One id duplicated, one missing, find both
- Find the id that appears once among triples
- Find the unpaired message with XOR