Greedy Algorithms8 sections · 316 units
Open in Course

What is Next

Looking ahead

You now understand the greedy approach:

1.1. Make locally optimal choices

2.2. Never reconsider past decisions

3.3. Requires greedy choice property and optimal substructure

4.4. Works when local optimum leads to global optimum. But how do you know greedy is correct? In the next section, I will show you proof techniques: exchange arguments and the "stays ahead" method. These tools let you verify greedy strategies with confidence. The proof techniques in the next section let you verify correctness without submitting and waiting for test failures. Learn them well.