Intro - Dynamic Programming Flashcards

1
Q

What is tabulation?

What type of approach is it?

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

What is the code for fibonacci using tabulation?

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

What is the run time of fibTabulation?

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

What is memoization? what type of approach is it?

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

What is the example fibonacci code for memoization approach?

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

what is the run time for the top down fib approach

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

Compare and contrast Tabulation vs Memoization.

Why use one over the other?

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

How do we know when to use:

Dynamic Programming

Greedy

Divide-and-Conquer

What must hold to use any of the above approaches?

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

What is a palindrome and what is the definition?

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

What is a subsequence?

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

What is the input of the longest palindromic subsequence problem?

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

What is the definition & required output of the longest palindromic subsequence problem?

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

What are the feasible solutions and correct output if there are no repeating characters in a palindrome sequence?

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

What is a solution in the following sequence?

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

What is the cost to brute force the longest palindromic subsequence problem?

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

What is the general recursive algorithm for the Longest palindromic subsequence

17
Q

What is the running time of our first palendrome sequnce.

A

Which is Omega (2n)

18
Q

Using the iteration method, what is the closed form of the following?

19
Q

For the bottom-up version of the longest palendromic sequence, how is the table setup?

20
Q

For the bottom up approach for the bottom-up version of longest palen, how do you setup the base cases?

21
Q

Assume we have a table of n = 8

What is the order in which the table is filled out with the bottom-up approach for longest palen

22
Q

Analyse the run time of this algorithm

23
Q

What is the order in which this table is filled out?

24
Q

What is the run time of this algo

25
What is the general optimal substructure format for longest palendrom (NOT the proof)
26
What is the optimal substructure proof for longest palendrome?
27
How does the overlapping subproblems work for longest palendrome/dynamic programming?