Problem 231 · Easy

Power of Two

n > 0 and (n & (n-1)) == 0: a power of two has exactly one set bit.

Open the interactive visualisation