← Quiz: 1D Dynamic Programming Patterns: all 10 questions
Quiz: 1D Dynamic Programming Patterns · Question 1 of 10
In the DP recipe, what should you decide first?
In the DP recipe, what should you decide first?
- A.The loop order
- B.The programming language
- C.The state: what dp[i] means in words
- D.The final answer's data type
Answer & explanation
Correct answer: The state: what dp[i] means in words
The recurrence, base case and answer all follow from a clearly defined state.
Can you get the rest right without peeking?
Take the timed Quiz: 1D Dynamic Programming Patterns quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →