Problems
Contests
Account
Problems
> Longest Block of Ones > Editorial
Longest Block of Ones — Solution & Editorial
Back to the Problem
Run-length scan, resetting the counter on every 0.
Complexity:
O(|S|)
×
Refer Job