Skills101
← All practice quizzes

Dynamic Programming Quiz

8 questions12 minPass: 60%+10 XP on first pass

States, recurrences, memoization vs tabulation, coin change, LCS and knapsack.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Dynamic programming helps most when a recursive solution has…

  2. Question 2

    In how many distinct ways can you climb 5 stairs taking 1 or 2 steps at a time?

  3. Question 3

    What is the maximum you can rob from houses [2, 7, 9, 3, 1] without robbing adjacent houses?

  4. Question 4

    Coins [1, 3, 4], amount 6. What is the minimum number of coins?

  5. Question 5

    What is the length of the longest common subsequence of "abcde" and "ace"?

  6. Question 6Select all that apply

    Which statements about memoization vs tabulation are true? (select all that apply)

  7. Question 7

    In 0/1 knapsack (each item at most once) with a 1D dp array, the inner loop over capacity should go…

  8. Question 8

    How is the time complexity of a DP solution usually estimated?