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…
More Apple interview questions
- LLM conceptual questions
- Implement a Two-Hidden-Layer MLP with Backpropagation in NumPy
- Compare PPO, DPO, and GRPO
- Implement a Vision Transformer (ViT) from Scratch
- Sample from a Gaussian Distribution Using Only Uniform Sampling
- Diagnose a CTR Drop After a Ranking Model Launch