Problem 1423 · Medium

Maximum Points You Can Obtain from Cards

Take exactly k cards from either end of a row to maximise the total points. The visual shows the left and right windows of taken cards sliding across the row.

Open the interactive visualisation