Problem 2379 · Easy

Minimum Recolors to Get K Consecutive Black Blocks

Slide a window of k blocks and track how many white blocks it holds, since each white block needs one recolor.

Open the interactive visualisation