- greedy algorithms is to pick the locally optimal solution at each step with the hope of finding the global optimum
- dp vs greedy
- in dp, we solve overall problem by combining the solutions about subproblems
- in greedy, we make a series of localized optimal choices without considering the overall problem
- greedy
- we need to make the locally optimal choice
- sometimes, use sorting or heap can help us make greedy choice