Problem 1784 · Easy

Check if Binary String Has at Most One Segment of Ones

Check whether a binary string has at most one contiguous segment of ones.

Open the interactive visualisation