← ALL NOTES
Array

2616. Minimize the Maximum Difference of Pairs

Given nums and a number p. Choose p non-overlapping pairs of indices; a pair's cost = |nums[i] − nums[j]|. Minimize the maximum cost among the chosen p pairs. Minimize-the-maximum with a monotone…

Loading…