Skip to content

Instantly share code, notes, and snippets.

@jah2488
Created October 13, 2021 16:11
Show Gist options
  • Save jah2488/869de7482f668857d8f2c95ae8ef8ad2 to your computer and use it in GitHub Desktop.
Save jah2488/869de7482f668857d8f2c95ae8ef8ad2 to your computer and use it in GitHub Desktop.
Description of the Coin Changer Kata

Coin Changer Kata

Description

Using the RGR (Red. Green. Refactor.) loop of TDD, write a method that accepts an positive integer value and returns an array of the smallest amount of change possible for that amount.

Examples

change(99) #=> [25, 25, 25, 10, 10, 1, 1, 1, 1]
change(72) #=> [25, 25, 10, 10, 1, 1]
change(50) #=> [25, 25]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment