Problem 1611 · Hard

Minimum One Bit Operations to Make Integers Zero

The minimum count is the XOR of all right shifts of n, which is the inverse Gray code of n.

Open the interactive visualisation