How to Optimally Handle Recursion?
An intuitive explanation of Dynamic programming
4 min readAug 30, 2022
What if you need to find the minimum number of coins that make up an amount with coins of different denominations? For example, if you are given 1 cent, 5 cents, and 10 cents and asked to use the minimum number of coins to make 18 cents.
The example of finding minimum coins is an optimization problem where you need to find the minimum number of coins that make up an amount. The solution needs to recursively check if the total can be reached by choosing the coin or…