package leetcode;

/**
 * https://leetcode.com/problems/count-binary-substrings/
 */
public class Problem696 {
    public int countBinarySubstrings(String s) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem696 prob = new Problem696();
        System.out.println(prob.countBinarySubstrings("00110011")); // 6
        System.out.println(prob.countBinarySubstrings("10101")); // 4
    }
}

package leetcode;

/**
 * https://leetcode.com/problems/count-binary-substrings/
 */
public class Problem696 {
    public int countBinarySubstrings(String s) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem696 prob = new Problem696();
        System.out.println(prob.countBinarySubstrings("00110011")); // 6
        System.out.println(prob.countBinarySubstrings("10101")); // 4
        System.out.println(prob.countBinarySubstrings("0011")); // 2
        System.out.println(prob.countBinarySubstrings("000111")); // 3
    }
}

Update problem 696