Skip to content

Commit 337adb0

Browse files
committed
chore:
1 parent a5ee629 commit 337adb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Leetcode/0322.Coin-Change/Coin-Change.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ func CoinChangeDP(coins []int, amount int) int {
6262

6363
// 外層 for 循環遍歷所有狀態的所有取值
6464
for i := 1; i <= amount; i++ {
65-
// 內層 for 循環遍歷球所有選擇的最小值
65+
// 內層 for 循環遍歷求所有選擇的最小值
6666
for _, coin := range coins {
6767
if i-coin < 0 {
6868
continue
6969
}
70+
// 狀態轉移
7071
dp[i] = min(dp[i], 1+dp[i-coin])
7172
}
7273
}

0 commit comments

Comments
 (0)