Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
3 answers
924 views

Coin Change Problem(Greedy Algorithm)

In Coin Change Problem, if the ratio of Coin Value ($\frac{Coin_(i+1)}{coin(i)}$) is always increasing then we can use Greedy Algorithm? Example- $(1,3,4)$ are denominations of coin. If I want to pay ...
Dhrub Kumar's user avatar
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 ...
Saeid's user avatar
  • 339