Given coins of different denominations and an amount, find the fewest coins needed to make up that amount. Return -1 if not possible.
Input: coins=[1,5,11], amount=15 Output: 3 (5+5+5) Input: coins=[2], amount=3 Output: -1
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features