package leetcode;

/**
 * https://leetcode.com/problems/binary-number-with-alternating-bits/
 */
public class Problem693 {
    public boolean hasAlternatingBits(int n) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem693 prob = new Problem693();
        System.out.println(prob.hasAlternatingBits(5)); // true
        System.out.println(prob.hasAlternatingBits(7)); // false
        System.out.println(prob.hasAlternatingBits(11)); // false
        System.out.println(prob.hasAlternatingBits(10)); // true
    }
}

package leetcode;

/**
 * https://leetcode.com/problems/binary-number-with-alternating-bits/
 */
public class Problem693 {
    public boolean hasAlternatingBits(int n) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem693 prob = new Problem693();
        System.out.println(prob.hasAlternatingBits(5)); // true
        System.out.println(prob.hasAlternatingBits(7)); // false
        System.out.println(prob.hasAlternatingBits(11)); // false
        System.out.println(prob.hasAlternatingBits(10)); // true
        System.out.println(prob.hasAlternatingBits(36)); // false
    }
}

Update problem 693