Skip to content

Latest commit

 

History

History

Minimum number of Coins

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Given a value value , if we want to make change for value Rs, and we have infinite supply of each of the denominations in Indian currency, i.e., we have infinite supply of { 1, 2, 5, 10, 20, 50, 100, 200 ,500, 1000 , 2000} valued coins/notes, what is the minimum number of coins and/or notes needed to make the change?

Input: V = 70
Output: 2
We need a 50 Rs note and a 20 Rs note.

Input: V = 121
Output: 3
We need a 100 Rs note, a 20 Rs note and a 1 Rs coin.