Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Coin Change
Medium
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Given coin denominations and an amount, find the minimum number of coins needed to make that amount.
Sample Input:
[1,2,5], 11
Sample Output:
3
Hints
Hint 1
Use dynamic programming to build up solutions for all amounts
Hint 2
Initialize DP array with infinity except DP[0] = 0
Hint 3
For each coin, update DP values for all amounts
Code Editor
Reset
Run
Save
Loading...