Skip to content

Solution Review: Power of 2

Let's solve this using brain kernighan's algorithm. This is optimized to O(1) time and space.

Gopi Gorantala
Gopi Gorantala
3 min read