Beautiful Binary String

  • + 0 comments

    One liner in JAVA :

    System.out.println((n-B.replaceAll("010","").length())/3);