Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 607 Bytes

005_makingchange.md

File metadata and controls

18 lines (13 loc) · 607 Bytes

Making Change

[Date]

Your quirky boss collects rare, old coins...

They found out you're a programmer and asked you to solve something they've been wondering for a long time.

Write a function that, given:

  1. an amount of money
  2. a list of coin denominations computes the number of ways to make the amount of money with coins of the available denominations.

Example: for amount = 4 (4¢) and denominations = [1,2,3] (1¢, 2¢ and 3¢), your program would output 44—the number of ways to make 44¢ with those denominations:

  • 1¢, 1¢, 1¢, 1¢
  • 1¢, 1¢, 2¢
  • 1¢, 3¢
  • 2¢, 2¢