โ† Amazon questions

Count pairs in array whose sum is less than X

Filed under Amazon

Given an array of integers and a target value X, count the number of pairs of indices (i, j) such that arr[i] + arr[j] < X.

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.