Find K pairs with the smallest sums
Given two sorted arrays and k, return the k pairs (one number from each array) with the smallest sums. Start a min-heap with pairs formed from the first elements and push the next candidate each time you pop, instead of building every pair.
No answer yet. Write the first one; the best answer gets endorsed.


