Skip to content
intermediate

Bitwise Manipulation

Use XOR, masks, shifts, and binary representation as the core problem-solving model.

Problems

Problems in Bitwise Manipulation

Practice problems that share this primary solution pattern and compare the clues that reveal it.

A historic stone tower rises against a dramatic, moody sky with dark clouds.
advanced
13 min read

Divide Two Integers

Repeated subtraction computes division correctly, but it counts quotient units one at a time. Under interview constraints, that is the wrong scale of…

View solution
Collection of handmade terracotta pots and plates on display with garden background.
intermediate
11 min read

Gray Code

Gray code looks like a permutation problem, but the useful signal is more specific: enumerate every n-bit state so that each move flips exactly one bit,…

View solution