Given a binary string s without leading zeros, return 'true' if and only if s contains at most one contiguous segment of ones.
A segment of ones is a maximal substring of consecutive '1' characters.
Input: A binary string s (consisting only of '0' and '1', no leading zeros).
Output: Return 'true' if at most one segment of ones, otherwise 'false'.
Input: 1001
Output: false
Explanation: Two segments of ones: '1' and '1' separated by '00'.Input: 110
Output: true
Explanation: Only one segment of ones: '11'.Input: 1
Output: true
Explanation: Single '1' — one segment.1 <= s.length <= 100s consists of '0' and '1' onlys does not have leading zeros