342.power-of-four.go 93 B

123
  1. func isPowerOfFour(num int) bool {
  2. return (num & (num-1) == 0) && (num & 0x55555555 != 0)
  3. }