โ† PhonePe questions

Apply +k or -k to every element to minimize max-min

Filed under PhonePe

The question

For every array element, add or subtract k exactly once so the difference between maximum and minimum is minimal.

No write-up yet. Related questions below have one.

Related PhonePe questions

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