Given a positive integer n, determine whether its binary representation has alternating bits. Return true if adjacent bits always have different values, and false otherwise.
Constraints:
n
Given a positive integer n, determine whether its binary representation has alternating bits. Return true if adjacent bits always have different values, and false otherwise.
Constraints:
n