Skip to content

Commit ace1ac6

Browse files
author
Joseph Luce
authored
Update 322_coin_change.md
1 parent 5606265 commit ace1ac6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

leetcode/medium/322_coin_change.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If we were to start at amount 0 and go up to the given amount.
1010
We can build the minimum coins as we increasing the amount by using the previous calculated minimum coins.
1111

1212
For example, if you have an input of [1,5,6] coins.
13-
As we known the minimum coins for amount 1 and 5 is 1.
13+
The minimum coins for amount 1 and 5 is 1.
1414
When we get to amount 6 with coin 5, we will look at amount 1 (6-5=1) for its minimum coin, which is 1 and do 1+1 at amount 6.
1515
Similarly, when we get to amount 12 with coin 6, we do 12-6=6, look at amount 6 which is 2 minimum coins and do 2+1 for amount 12.
1616
We repeat this until we reach the given amount.

0 commit comments

Comments
 (0)