Given an integer n, return true if it is a power of four. Pattern focus: Isolate Lowest Bit. First confirm that n is a power of two, then verify that the single set bit sits at an even position.
n = integer
true if n is a power of four
Example 1:
Input:
n = 16
Output:
true
Explanation:
16 is 4^2.
Example 2:
Input:
n = 8
Output:
false
Explanation:
8 is a power of two but not a power of four.