Sponsored
Use these hints if you're stuck. Try solving on your own first.
Check every possible segment of 0s and 1s.
Is there a way to iterate through the string to keep track of the current character and its count?
Solve with full IDE support and test cases