Find K Pairs with Smallest Sums

Return the k pairs with the smallest sums from two sorted arrays. Each pair uses one index from nums1 and one index from nums2, and duplicate values at different positions count as different pairs. When several pairs share a boundary sum, any valid selection and any order of the returned pairs is accepted.

Examples
Input: [[1,7,11],[2,4,6],3]
Output: [[1,2],[1,4],[1,6]]
Hints

Find K Pairs with Smallest Sums

Return the `k` pairs with the smallest sums from two sorted arrays. Each pair uses one index from `nums1` and one index from `nums2`, and duplicate values at different positions count as different pairs. When several pairs share a boundary sum, any valid selection and any order of the returned pairs is accepted.