We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Beautiful Binary String
Beautiful Binary String
Sort by
recency
|
854 Discussions
|
Please Login in order to post a comment
// c#
Basic solution
int beautifulBinaryString(string b) { int result = 0; while (b.find("010")!=string::npos) { ++b[b.find("010")+2]; result++; } return result; }
Here is problem solution in python java c++ c and javascript - https://programmingoneonone.com/hackerrank-beautiful-binary-string-problem-solution.html
python 3