Page 1 of 1

You are a traveler and traveling to a country where the currency denominations are unknown and as you travel, you get

Posted: Mon Jul 11, 2022 9:49 am
by answerhappygod
You are a traveler and traveling to a country where the currency denominations are unknown and as you travel, you get to know about the denomination in random order.You want to make a payment of amount x, in such a way that the number of notes you give is minimum.//Assume that the denominations are in such a way that any amount can be paid.(java)
InputTake input of all the currency denominations ( random order)
OutputPrint the minimum no of notes that you will be using to pay the net amount.
TestCase 1Enter the size of currency denominations 3Enter the currency denominations value5110Enter the amount you want to pay12Your payment approach in order to give min no of notes will be10:11:2