In this module, we will learn about dynamic programming techniques to solve optimization problems. We will explore 1D, multidimensional, and matrix DP.
- 1D DP
- Multidimensional DP
- Matrix DP
- Climbing Stairs
- Coin Change
- Unique Paths II
-
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
-
What is the time complexity of the Coin Change problem?
- A) O(n)
- B) O(n * amount)
- C) O(amount)
-
In the Climbing Stairs problem, what is the base case?
- A) 0 stairs
- B) 1 stair
- C) 2 stairs
-
How does memoization help in dynamic programming?
- A) By reducing space complexity
- B) By storing previously computed results
- C) By increasing time complexity
-
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