You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Problem Statement: Given a value V, if we want to make a change for V Rs, and we have an infinite supply of each of the denominations in Indian currency, i.e., we have an infinite supply of { 1, 2, 5, 10, 20, 50, 100, 500, 1000} valued coins/notes, what is the minimum number of coins and/or notes needed to make the change.
// Example 1:
// Input: V = 70
// Output: 2
// Explaination: We need a 50 Rs note and a 20 Rs note.
// Example 2:
// Input: V = 121
// Output: 3
// Explaination: We need a 100 Rs note, a 20 Rs note and a 1 Rs coin.