Coin Change II (Unbounded Knapsack)
Medium · Dynamic Programming · about 20 minutes
Asked at Amazon, Stripe, Coinbase, Google, Visa, Plaid, Ramp, Affirm, Klarna, Revolut, American Express, Rippling, Brex, Mercury, Kraken.
Given coin denominations coins (unlimited supply of each) and an amount, return the number of combinations of coins that make up that amount (order doesn't matter), or 0 if none.