10.2 Dynamic Programming Flashcards

1
Q

What does the recurrence tree of the dynamic programming version of the Fibonaccia Sequence look like?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is memoization

A

Caching values so we don’t have to repeat the same process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the memoised recursive version of Weighted Interval Scheduling (and runtime)

A
  • Start from last element first: either in set or not, recurse on both cases.
  • Runtime O(nlogn)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the memoised itterative version of Weighted Interval Scheduling (and runtime)

A
  • Building way up from start. Last element (of current starting set) is either in or not. We have already cached the values, so continue.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly