Interview question · Dynamic programming
Coin Change II
Coin Change II is a Medium question that uses the dynamic programming pattern. PrepKit files it under Dynamic programming.
PrepKit lists the title and a link. The problem statement stays on the original site.
Checking your saved items
Source content: English
Key facts
- Topic
- Dynamic programming
- Pattern
- dynamic programming
- Difficulty
- Medium
- Appears in
- NeetCode 150
- Website
- leetcode.com
- License
- MIT License
How to use it
- Read the problem on the original site.
- Try it on your own before you look at hints or solutions.
- Then work through a related question with the same pattern.
About the Dynamic programming pattern
PrepKit study notes. PrepKit editors wrote these as general advice. They are not taken from the problem or from any published solution.
- What it is
- Breaking a problem into overlapping subproblems and storing each answer so it is computed only once.
- How to recognize it
- You are asked for a count, a minimum, a maximum or whether something is possible, and the answer for a larger input depends on answers for smaller ones.
- Common pitfalls
- A state definition too vague to write a transition from, wrong base cases, and filling the table in an order where the values you need are not ready yet.
Related preparation
These are PrepKit study suggestions, not employer endorsements or predictions of interview questions.
- Dynamic programming cheatsheet for coding interviews
A reviewed question-to-resource association.
Pages that include this
Related questions
Common questions
Where can I practice Coin Change II?
Open it on leetcode.com. PrepKit links there and does not copy the problem.
What pattern does Coin Change II use?
PrepKit files it under dynamic programming, at Medium difficulty.