Advertisement
1784. Check if Binary String Has at Most One Segment of Ones
UnknownView on LeetCode
1784.cs
C#
public class Solution
{
public bool CheckOnesSegment(string s)
{
return !s.Contains("01");
}
}Advertisement
public class Solution
{
public bool CheckOnesSegment(string s)
{
return !s.Contains("01");
}
}