AI engineering glossary · Data structures algorithms
What is coin change problem?
Coin change problem: The task of finding the fewest coins that add up to a target amount, or the number of ways to make it. Greedy choices can fail for unusual coin sets, so dynamic programming is used.
Coin change problem: an example
For coins 1, 3, 4 and amount 6, greedy picks 4+1+1 (three coins) but the best is 3+3 (two coins).
Related terms
More Data structures algorithms terms
- Collision
- Comparison sort
- Connected components
- Consistent hashing
- Counting sort
- Cycle detection
- Data structure
- Depth-first search
Where you learn it
Coin change problem is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.