I was recently faced with a prompt for a programming algorithm that I had no idea what to do for. I\'ve never really written an algorithm before, so I\'m kind of a newb at t
Recursive solution based on algorithmist.com resource in Scala:
def countChange(money: Int, coins: List[Int]): Int = { if (money < 0 || coins.isEmpty) 0 else if (money == 0) 1 else countChange(money, coins.tail) + countChange(money - coins.head, coins) }