← Dynamic Programming Quiz: all 8 questions
Dynamic Programming Quiz · Question 8 of 8
How is the time complexity of a DP solution usually estimated?
How is the time complexity of a DP solution usually estimated?
- A.Number of states × work per state
- B.Always O(n²)
- C.Number of base cases
- D.Depth of recursion only
Answer & explanation
Correct answer: Number of states × work per state
E.g. LCS has m × n states with O(1) work each → O(m·n).
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 →