Problem 1508 · Medium

Range Sum of Sorted Subarray Sums

Sum the requested slice of all contiguous subarray sums after sorting them. The visual lists the subarray sums in order and highlights the chosen rank range.

Open the interactive visualisation