LeetCode
Max Consecutive Ones III
Click
here
for an explanation.