← Amazon questions

Value to subtract to make sum K

Filed under Amazon

Given an array of integers, find a value X to subtract from all elements in the array such that the sum of the remaining positive elements equals exactly K. If multiple solutions exist, return any…

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.