Problem 191 · Easy

Number of 1 Bits

n & (n-1) removes the lowest set bit; count iterations until n is zero.

Open the interactive visualisation