auto commit

This commit is contained in:
CyC2018 2020-11-02 00:58:34 +08:00
parent a9d58b91de
commit ae7fd87fc0
2 changed files with 2 additions and 0 deletions

View File

@ -912,6 +912,7 @@ return -1.
```java
public int coinChange(int[] coins, int amount) {
if (amount == 0 || coins == null) return 0;
int[] dp = new int[amount + 1];
for (int coin : coins) {
for (int i = coin; i <= amount; i++) { //将逆序遍历改为正序遍历

View File

@ -912,6 +912,7 @@ return -1.
```java
public int coinChange(int[] coins, int amount) {
if (amount == 0 || coins == null) return 0;
int[] dp = new int[amount + 1];
for (int coin : coins) {
for (int i = coin; i <= amount; i++) { //将逆序遍历改为正序遍历