0

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

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
1
EBit Manipulation
2
EBit Manipulation
3
EBit Manipulation
4
EBit Manipulation
5
EBit Manipulation
6
MBit Manipulation
7
MBit Manipulation
8
EBit Manipulation
9
MBit Manipulation
10
11
MBit Manipulation
12
13
MBit Manipulation
14
MBit Manipulation
15
MBit Manipulation