What is a Coin Change Visualizer?
A coin change visualizer shows how dynamic programming solves a target amount from reusable coin denominations. This page focuses on the minimum-coins version of the problem.
Enter coin values and a target amount, then inspect each DP update, the amount that feeds the candidate value, and one reconstructed optimal coin set.
For the full algorithm set, browse the Data Structure Visualizers hub.
How to use this coin change visualizer
- Enter coin denominations such as
1, 3, 4. - Enter the target amount.
- Click Run Coin Change to compute the minimum number of coins.
- Step forward to inspect each amount update for each coin.
- Read the selected coins in the output panel.
Coin change and dynamic programming
For the minimum coin problem, dp[amount] stores the fewest coins needed for that amount. When coin c is available, the candidate value is dp[amount - c] + 1.
For related DP table problems, compare this page with the Longest Increasing Subsequence Visualizer, Longest Common Subsequence Visualizer, Edit Distance Visualizer, and Knapsack DP Visualizer.