Count Binary Substrings
Problem Problem_Link My Answer 1 hour limit no search on internet My result Compile Error Best Answer Search from internet and modify class Solution { public int countBinarySubstrings(String s) { int curRun = 1; int preRun = 0; int count = 0; for (int i = 1; i < s.length(); i++) { if (s.charAt(i) == s.charAt(i - 1)) ++curRun; else { count += Math.min(curRun, preRun); preRun = curRun; curRun = 1; } } return count + Math.