power of two c 2b 2b

Solutions on MaxInterview for power of two c 2b 2b by the best coders in the world

showing results for - "power of two c 2b 2b"
Simón
13 Nov 2016
1bool IsPowerOfTwo(int x) {
2    return x && ((x & (x - 1)) == 0);
3}