#322

Coin Change

medium· 1-D DPruns: 0

You are given an integer array coins representing coin denominations and an integer amount representing a total. Return the fewest number of coins needed to make up that amount. If it cannot be made up, return -1. You may assume you have an infinite supply of each coin.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.