Check if a number is a power of 2

1 min read

https://practice.geeksforgeeks.org/problems/power-of-2/0

Count total set bits in all numbers from 1 to N
Find position of the only set bit