Skip to content

fishermanswharff/makechange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Make Change

##Imagine you landed a new job as a cashier...

Your quirky boss found out that you're a programmer and has a weird request about something they've been wondering for a long time.

##Write a function that, given:

  • an amount of money
  • a list of coin denominations
  • computes the number of ways to make 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 4—the number of ways to make 4¢ with those denominations:

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

About

Make Change in Ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages