C Plus Plus Quiz
10 questions · no time limit
0:00
ALGORITHMS AND COMPLEXITY
Question 1 of 10
No time limit
Current
Answered
Flagged
Not seen
PASSAGE
A recursive function computes a sequence in which each value depends only on the preceding two values. Memoization reduces the function's running time from exponential to O(n) but stores all n previously computed values.
If the program needs only the final sequence value, which modification best improves the time/space tradeoff without increasing asymptotic running time?
YOUR PROGRESS
10
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F
Answers save as you go · flagged questions come back at the end