Find K Pairs with Smallest Sums

Asked at Apple · Coding Questions · Difficulty: Medium · Last asked Jan 22, 2026

You are given two integer arrays `nums1` and `nums2` sorted in non-decreasing order, and an integer `k`. Define a pair `(u, v)` with `u` from `nums1` and `v` from `nums2`. Return the `k` pairs `(u, v)` with the smallest sums.

Loading the problem…