Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is memoization?
Think about how it relates to reducing repetitive work.
What is the base case in recursion?
It's the stopping point for recursion.
What term refers to storing previously computed results in a recursive function?
Think about the technique that helps speed up function calls.
True or False: Memoization can improve the time complexity of certain recursive algorithms.
Consider the effect on redundant calculations.
Implement a function using memoization to calculate the nth Fibonacci number in Python.
Think about how to store each result in a dictionary or a similar structure.
Given the overlapping subproblems property, compare memoization performance with simple recursion in terms of function calls for Fibonacci(6). Show how many calls are made without and with memoization.
Calculate recursive calls manually or trace them out in a tree diagram.
5 more questions in this section. Enroll free to practise them all.
Enroll free