Challenging SHOPKEEPER COIN problem

Go down

Challenging SHOPKEEPER COIN problem Empty Challenging SHOPKEEPER COIN problem

Post  Ramprasadg on Mon Aug 18, 2008 2:57 pm

remember what sunita mam was saying in class.....i know most of us don't Sleep .
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 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)


Posts : 12
Join date : 2008-08-13

View user profile

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum