import java.io.*;
import java.util.*;


class CheckIfBinaryStringHasAtMostOneSegmentOfOnes
{
    public static void main(String[] args)
    {
        System.out.println("=== 1784. Check if Binary String Has at Most One Segment of Ones ===");
        Solution solution = new Solution();
        String[] input = {"1001", "110"};
        for (String s: input) {
            System.out.println("s = "+s);
            System.out.println("output = "+solution.checkOnesSegment(s));
        }
    }
}


class Solution
{
    public boolean checkOnesSegment(String s) {
        return s.indexOf("01") < 0;
    }
}
