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.
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.
3
Q
When should you use dynamic programming?
A
When you cannot find a greedy solution that is correct for all cases.
4
Q
Why is dynamic programming close to brute force?
A
It explores all possibilities without examining each combination explicitly.
5
Q
A