โ† Amazon questions

Find the closest pair from two sorted arrays

Filed under Amazon

Given two sorted arrays A and B and a target value T, find a pair (a, b) where a is from A and b is from B such that |(a + b) - T| is minimized.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.