← Amazon questions

Find pairs that add up to 0, closest to 0, and farthest from 0

Filed under Amazon

Given an integer array, find three specific sets of pairs: 1) All pairs that sum exactly to 0. 2) All pairs whose sum is closest to 0 (minimum absolute sum, excluding zero if possible or including it…

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.