Skip to content

Instantly share code, notes, and snippets.

@see-why
Created March 17, 2022 22:26
Show Gist options
  • Save see-why/5d077136b9939b6cc0d4d9042be66db4 to your computer and use it in GitHub Desktop.
Save see-why/5d077136b9939b6cc0d4d9042be66db4 to your computer and use it in GitHub Desktop.
HackerRank Beautiful Binary String challenge solution
# https://www.hackerrank.com/challenges/countingsort2/problem?isFullScreen=true
def beautifulBinaryString(b):
# Write your code here
if '010' not in b:
return 0
else:
return b.count('010')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment