mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-10 08:50:20 +08:00
deploy
This commit is contained in:
@ -5313,7 +5313,7 @@ dp[i, a] = \min(dp[i-1, a], dp[i, a - coins[i-1]] + 1)
|
||||
<h2 id="1453-coin-change-problem-ii">14.5.3 Coin change problem II<a class="headerlink" href="#1453-coin-change-problem-ii" title="Permanent link">¶</a></h2>
|
||||
<div class="admonition question">
|
||||
<p class="admonition-title">Question</p>
|
||||
<p>Given <span class="arithmatex">\(n\)</span> types of coins, where the denomination of the <span class="arithmatex">\(i^{th}\)</span> type of coin is <span class="arithmatex">\(coins[i - 1]\)</span>, and the target amount is <span class="arithmatex">\(amt\)</span>. <strong>Each type of coin can be selected multiple times</strong>, <strong>ask how many combinations of coins can make up the target amount</strong>. See the example below.</p>
|
||||
<p>Given <span class="arithmatex">\(n\)</span> types of coins, where the denomination of the <span class="arithmatex">\(i^{th}\)</span> type of coin is <span class="arithmatex">\(coins[i - 1]\)</span>, and the target amount is <span class="arithmatex">\(amt\)</span>. Each type of coin can be selected multiple times, <strong>ask how many combinations of coins can make up the target amount</strong>. See the example below.</p>
|
||||
</div>
|
||||
<p><a class="glightbox" href="../unbounded_knapsack_problem.assets/coin_change_ii_example.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="Example data for Coin Change Problem II" class="animation-figure" src="../unbounded_knapsack_problem.assets/coin_change_ii_example.png" /></a></p>
|
||||
<p align="center"> Figure 14-26 Example data for Coin Change Problem II </p>
|
||||
@ -6190,7 +6190,7 @@ aria-label="Footer"
|
||||
<div class="md-copyright">
|
||||
|
||||
<div class="md-copyright__highlight">
|
||||
Copyright © 2022-2024 krahets<br>The website content is licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>
|
||||
Copyright © 2024 krahets<br>The website content is licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user