问题
There is an array A of size n. We are given the number of partitions k. How to find the minimum sum of range of all partitions? Range is difference between maximum and mimimum element in that partition. For eg. A={20, 30, 40, 41, 45}, k = 4. The minimum possible sum of range of all partitions is 1.
来源:https://stackoverflow.com/questions/40188492/how-to-find-the-minimum-sum-of-range-of-k-partitions-of-an-array-of-size-n