Study Notes
Problem editorialmedium

The bit vocabulary

Eight classic problems, but not eight tricks. They are all built from a handful of moves. Learn the words, and the sentences write themselves.

21 min read·time O(n)·space O(1)
Six core movesXOR cancellationn & (n-1)Cheat sheet