Sponsored
Use these hints if you're stuck. Try solving on your own first.
It's guaranteed to have at least one segment
The string size is small so you can count all segments of ones with no that have no adjacent ones.
Solve with full IDE support and test cases