LeetCode 322: Coin Change — Step-by-Step Visual Trace
Medium — Dynamic Programming | Array | Greedy
The Problem
Given an array of coin denominations and a target amount, find the minimum number of coins needed to make up that amount, or return -1 if it's impossible.
Approach
Uses dynamic programming wit...
blog.tracelit.dev2 min read