LeetCode
Max Consecutive Ones
Click
here
for an explanation.