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.

Level: intermediateTopic: Data structures algorithms

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.