Coin Change | Dynamic Programming (opens in new tab)
Problem Statement leetcode.com Given an array of coin denominations coins[] and an integer amount, return the minimum number of coins required to make up that amount. If it is not possible to form the amount, return -1. You can use a coin unlimited number of times. Brute Force Intuition For every amount, try using each available coin and recursively solve for the remaining amount. At each step, we explore all possible choices and take the minimum coins among all valid combinations. The same s...
Read the original article