490
2 Likes

DSA Crash Course [Part 83] - Counting Change Approach

In this lesson, Alvin explores the strategy to solving the following interview problem:

Write a function, counting_change, that takes in an amount and a list of coins. The function should return the number of different ways it is possible to make change for the given amount using the coins.

You may reuse a coin as many times as necessary.

For example,

counting_change(4, [1,2,3])