Bit Manipulation
Integers as bit vectors. Sets in 32 bits, XOR tricks and subset enumeration.
Newinterview weight 5015 problems0 visualisers
18
mastery
Attempts logged
0
Predicted success on the next one
33%
Solved here
0 / 15
What you actually need to hold in your head
- x AND x-1 clears the lowest set bit
- A value XOR itself is zero, so XOR pairs things off
- 1 shifted left by k builds subset masks
- Submask enumeration walks s = (s-1) AND m
Comfortable with these first
Next in the path
Advanced
Patterns in this topic
The trigger phrases are what you are training yourself to notice.
Bit Manipulation problems
Ordered by sheet phase, so the early ones are the highest signal.
0 / 15 solved