http://www.perlmonks.org?node_id=87683


in reply to (Golf) Giving Change

  1. Is the set of denominations guaranteed to contain a penny? If not, this is the knapsack problem (which is NP-complete, BTW).
  2. Is 2,250 pennies a valid solution for $22.50?