0322. 零钱兑换 #123
0322. 零钱兑换
#123
Replies: 1 comment 1 reply
-
广度优先搜索的代码有问题 for coin in coins:
if cur == coin:
return step
elif cur > coin and cur - coin not in visited:
queue.append(cur - coin)
visited.add(cur - coin)
...... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
0322. 零钱兑换
https://algo.itcharge.cn/solutions/0300-0399/coin-change/
Beta Was this translation helpful? Give feedback.
All reactions