Concept Flow - Greedy vs DP How to Know Which to Apply
Start Problem
Check for Greedy Choice Property?
|Yes
Apply Greedy Algorithm
Get Solution
No
Check for Overlapping Subproblems?
|Yes
Apply Dynamic Programming
Get Solution
No
Problem may need other methods or backtracking
Decide if problem fits greedy choice property to use greedy; else if overlapping subproblems exist, use dynamic programming; otherwise, consider other methods.
