⚡ AlgoZen_
~/home/dynamic_programming/coin_change4 / 6

Coin Change

Intermediate

Find the minimum number of coins needed to make a target amount. Uses bottom-up DP: solve for each amount from 0 to target, trying every coin denomination and keeping the best.

time:O(n × amount)
space:O(amount)
⚡ +200_XP
step[1/44]
> Start
$0
0
$1
0
$2
0
$3
0
$4
0
$5
0
$6
0
$7
0
Coin Change: find minimum coins to make $7. Coins: [1, 3, 4]

// tap NEXT STEP to walk through one step at a time