1784. Check if Binary String Has at Most One Segment of Ones
Description
**Input:** s = "1001"
**Output:** false
**Explanation:** The ones do not form a contiguous segment.**Input:** s = "110"
**Output:** trueac
Last updated
**Input:** s = "1001"
**Output:** false
**Explanation:** The ones do not form a contiguous segment.**Input:** s = "110"
**Output:** trueLast updated