Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.04 KB

module11-quiz.md

File metadata and controls

40 lines (31 loc) · 1.04 KB

Module 11: Dynamic Programming

In this module, we will learn about dynamic programming techniques to solve optimization problems. We will explore 1D, multidimensional, and matrix DP.

Topics Covered

  • 1D DP
  • Multidimensional DP
  • Matrix DP

Key Problems

  • Climbing Stairs
  • Coin Change
  • Unique Paths II

Quiz

  1. What is dynamic programming primarily used for?

    • A) To divide problems into subproblems
    • B) To find optimal solutions by storing results of subproblems
    • C) Both A and B
  2. What is the time complexity of the Coin Change problem?

    • A) O(n)
    • B) O(n * amount)
    • C) O(amount)
  3. In the Climbing Stairs problem, what is the base case?

    • A) 0 stairs
    • B) 1 stair
    • C) 2 stairs
  4. How does memoization help in dynamic programming?

    • A) By reducing space complexity
    • B) By storing previously computed results
    • C) By increasing time complexity
  5. In Unique Paths II, how do obstacles affect the path count?

    • A) They have no effect
    • B) They reduce the count by half
    • C) They block certain paths