Optimization line
Greedy problems
Problems where taking the best-looking choice at each step is always safe. The work is in seeing why that choice can never hurt; the code is often one pass.
- 8 medium
The 8 problems
In the order the app teaches them. Each page has the problem, five hints and the explained solution.
- Maximum SubarrayMedium
- Jump GameMedium
- Jump Game IIMedium
- Gas StationMedium
- Hand of StraightsMedium
- Merge Triplets to Form Target TripletMedium
- Partition LabelsMedium
- Valid Parenthesis StringMedium
On the roadmap
Greedy is a station on the optimization line. It builds on 2-D Dynamic Programming. Next comes Intervals.
The roadmap says why each line runs in its order.
Patterns
One pattern solves these problems. Naming them gives the problems’ methods away, so the list is folded.
Show it
- Greedy choice8 problems