Available question text
Check whether a binary string (guaranteed to start with '1') contains at most one contiguous run of '1's — equivalently, verify that the pattern '1...0...1' never occurs. Return true if all ones form a single segment, otherwise false.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1784. Check if Binary String Has at Most One Segment of Ones
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source