Fewest coins when change can be given back

0
Remix

You need to pay an amount using coins of given denominations, but you may overpay and receive change back in the same denominations. Return the fewest coins that change hands in total (coins you pay plus coins you get back).

Compare it with the standard coin-change problem and explain how you bound how much overpaying can help.

SnowflakeTechnical phone screenLast asked Mar 2026
No answer yet. Write the first one; the best answer gets endorsed.