Maximize disjoint k-sum pairs | MathWorks Interview Question