Problem 485 · Easy

Max Consecutive Ones

Track the current run of ones and keep the longest run seen; a zero resets the run.

Open the interactive visualisation