All Questions
1 question
3
votes
1
answer
3k
views
A variant of coin change problem
Consider a cashier machine that takes payments in coins. We feed the machine coins one by one until the value is more than the amount we should have paid. Then the machine returns the extra amount in ...