6 Dynamic Programming Flashcards

1
Q

What is dynamic programming?

A

A programming technique that breaks down the problem into sub-problems and finds the best solution for a subproblem. It then uses that previous solution to build a new optimum to a bigger sub-problem.

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

What programming technique is preferable, greedy or dynamic?

A

Greedy, as it uses a rule to find the optimum at each step and usually only makes one decision per input item.

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

When should you use dynamic programming?

A

When you cannot find a greedy solution that is correct for all cases.

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

Why is dynamic programming close to brute force?

A

It explores all possibilities without examining each combination explicitly.

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