Maximize Win From Two Segments
Slide a window of width k over the sorted prizes and add the best window that finishes before it, which keeps the two segments apart.
Slide a window of width k over the sorted prizes and add the best window that finishes before it, which keeps the two segments apart.