Given an integer, write a function to determine if it is a power of two.
水到家了!
func isPowerOfTwo(n: Int) -> Bool {
return ( n > 0 && 1073741824 % n == 0);
}
Given an integer, write a function to determine if it is a power of two.
func isPowerOfTwo(n: Int) -> Bool {
return ( n > 0 && 1073741824 % n == 0);
}