leetcode.com

Coin Change | Dynamic Programming (opens in new tab)

Discussed on DEV

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
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help