Skip to content

Commit 043d8c2

Browse files
committed
Create power-of-three.go
1 parent de75e6d commit 043d8c2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

power-of-three.go

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//https://leetcode.com/problems/power-of-three/
2+
3+
package leetcode_solutions_golang
4+
5+
func isPowerOfThree(n int) bool {
6+
if n > 0 && 1162261467%n == 0 {
7+
return true
8+
}
9+
return false
10+
}

0 commit comments

Comments
 (0)