Search
⌘K

Leetcode 1869. Longer Contiguous Segments of Ones than Zeros

Check whether the longest consecutive run of '1's in a binary string s is strictly greater than the longest consecutive run of '0's by scanning the string and tracking maximum contiguous counts for each.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.