dengxinyi 6 years ago
parent
commit
421c0921f9
1 changed files with 3 additions and 0 deletions
  1. 3 0
      easy/342.power-of-four.go

+ 3 - 0
easy/342.power-of-four.go

@@ -0,0 +1,3 @@
+func isPowerOfFour(num int) bool {
+	return (num & (num-1) == 0) && (num & 0x55555555 != 0)
+}