LeetCode
Max Consecutive Ones II
Click
here
for an explanation.