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 a recursive function?
Think of how factorials are computed.
What is memoization?
Remember it helps avoid repeated calculations.
What is the time complexity of naive recursive Fibonacci?
Consider how many calls are made in a recursion tree.
True or False: Memoization can reduce the time complexity of recursive functions.
Remember how it stores values.
Using dynamic programming, create an algorithm to compute the nth Fibonacci number and count how many times the function was called.
Use an array to hold computed Fibonacci values and loop through for the final result.
Propose a new recursive function incorporating memoization to compute the nth Fibonacci number in Python. Show the implementation.
Choose a dictionary to map inputs to Fibonacci results.
5 more questions in this section. Enroll free to practise them all.
Enroll free