Binary Number with Alternating Bits
Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values.
LeetCode Problem - 693
class Solution {
// Method to check if the binary representation of a number has alternating b...
perfinsights.hashnode.dev1 min read