โ† Amazon questions

Sum of Two Numbers Closest to K

Filed under Amazon

Given an array of integers and an integer K, find two numbers in the array whose sum is less than or equal to K and as close to K as possible. Return the maximum possible sum.

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.