LeetCode
Minimum Number of K Consecutive Bit Flips
Click
here
for an explanation.