Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
23.9. Memoization and Dynamic Programming
This section
Practice test
10 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
2 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is dynamic programming?
Hint
Think of how recursive functions work.
- 2.
What is the base case in the factorial function?
Hint
Consider what the output should be for zero!
- 3.
What does dynamic programming generally focus on?
- Recursive approaches
- Iterative processes built on stored results
- Sorting algorithms only
Hint
Think about how dynamic programming reduces repeated calculations.
- 4.
True or False: Memoization is a technique that stores previously computed results.
- True
- False
Hint
Consider whether ideas have been repeated in your study.
- 5.
Given an array of weights and values, determine how to maximize value with a weight limit using dynamic programming.
Hint
Think of how you can compute values iteratively based on smaller weight limits.
- 6.
Devise a dynamic programming algorithm to find the longest common subsequence of two strings.
Hint
What relationships can you derive between characters of the strings?
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
Get your answers marked and your progress tracked
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting