Skip to content

231-power-of-two

DevGod
DevGod
Elf Vtuber
bool isPowerOfTwo(int n) {
if(n <= 0){return false;}
return ((n)&(n-1))==0;
}