LeetCode
Find K Pairs with Smallest Sums
Click
here
for an explanation.