How to Optimally Handle Recursion?

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…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Renu Khandelwal

Renu Khandelwal

5K Followers

Loves learning, sharing, and discovering myself. Passionate about Machine Learning and Deep Learning