Challenging SHOPKEEPER COIN problem
Page 1 of 1
Challenging SHOPKEEPER COIN problem
remember what sunita mam was saying in class.....i know most of us don't .
PROBLEM:
given a set of denominations,make an amount with min no of coins.
no of coins of each denomination is unlimited.
but the catch is that u can also get back money i.e. its like a shop keeper on the other side and not a ATM machine.
for eg:
given 1 , 10 ,15 as the denominations
u can make 20 from 2 coins by 10+10
u can form 5 from 2 coins by 15-10.ie by giving 15 Rs and getting back 10Rs.
u can form 4 from 3 coins by 15-10-1.
u can form 9 from 2 coins by 10-1.
(if u remember this problem is different from the general coin-denomination problem,in general problem u can make Rs5 only by 5*Rs1 coins)
BEST OF LUCK!!
PROBLEM:
given a set of denominations,make an amount with min no of coins.
no of coins of each denomination is unlimited.
but the catch is that u can also get back money i.e. its like a shop keeper on the other side and not a ATM machine.
for eg:
given 1 , 10 ,15 as the denominations
u can make 20 from 2 coins by 10+10
u can form 5 from 2 coins by 15-10.ie by giving 15 Rs and getting back 10Rs.
u can form 4 from 3 coins by 15-10-1.
u can form 9 from 2 coins by 10-1.
(if u remember this problem is different from the general coin-denomination problem,in general problem u can make Rs5 only by 5*Rs1 coins)
BEST OF LUCK!!
Ramprasadg- Posts : 12
Join date : 2008-08-13
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum