Problem 3511 · Medium

Make a Positive Array

Every non-positive window needs a replaced position inside it; sort the windows by right end and replace the right end whenever a window is still unhit.

Open the interactive visualisation