← Problem Solving Patterns

Greedy Patterns

Greedy Patterns

A greedy algorithm makes the best local move at each step.

Key requirement

You must justify why local best leads to global best.

Practice

  • Jump Game
  • Partition Labels
  • Best Time to Buy and Sell Stock

Practice Problems