The question that punishes greedy. Interviewers pick denominations where taking the biggest coin first gives the wrong answer, and they watch whether you reach for DP and handle the impossible-amount case cleanly.
← Coding & DSA / 75
mediumAmazonAdobeGoogle
Coin change: fewest coins to make an amount.
The question that punishes greedy. Interviewers pick denominations where taking the biggest coin first gives the wrong answer, and they watch whether you reach for DP and handle the impossible-amount case cleanly.
Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.
Unlock the other 466 answers · ₹2,000 / $25Your progress and mastery stay saved · 6 months · one payment · no auto-renew
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE
The single most common wrong answer is greedy, and it is wrong for denominations like [1,3,4] making 6. If a candidate proposes greedy, the strong move is to immediately produce the counterexample yourself before the interviewer does. The other graded detail is returning -1 for unreachable amounts instead of a garbage large number.
DISCUSSION · 0
No comments yet — be the first to share your approach.
