← Dynamic Programming Quiz: all 8 questions
Dynamic Programming Quiz · Question 4 of 8
Coins [1, 3, 4], amount 6. What is the minimum number of coins?
Coins [1, 3, 4], amount 6. What is the minimum number of coins?
Answer & explanation
Correct answer: 2
3 + 3 = 6. Greedy (4 + 1 + 1) gives 3 coins, which is why this needs DP.
Can you get the rest right without peeking?
Take the timed Dynamic Programming Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →