Alternating Bits Check
Check whether a positive integer has alternating bits in its binary representation, meaning no two adjacent bits are the same. Return true if the pattern alternates, false otherwise.
Check whether a positive integer has alternating bits in its binary representation, meaning no two adjacent bits are the same. Return true if the pattern alternates, false otherwise.