WorkspaceLearning path
Level 5 · Advanced Problem Solving
BUILD YOUR INTUITION

Greedy

Keep the strongest reachable state when a local choice can be proven to preserve every future possibility.

THE MENTAL MODEL

When should this come to mind?

Keep the strongest reachable state when a local choice can be proven to preserve every future possibility.

Reachable frontierSafe local choiceDominated alternatives

What makes it work

Prove why discarded choices cannot help. In Jump Game, every position up to the farthest reachable index remains reachable.

When to choose something else

When a local choice can block a better future result, use dynamic programming or search instead.

See the pattern in action

Change the input. Follow the state. Make it yours.