Problem 3689 · Medium

Maximum Total Subarray Value I

Every subarray has a range no wider than the whole array, so repeating the whole array k times is the best choice.

Open the interactive visualisation