Hackerrank - Beautiful Binary String

Hackerrank - Problem Statement

A description of the problem can be found on Hackerrank.

Solution

I replaced all occurences of "010" with an arbitrary placeholder. Then I counted the placeholders.

I created solution in:

All solutions are also available on my GitHub.

Java

JavaScript

Scala

Ruby

Leave a Reply