Workspace Greedy
0d
Problem-solving patterns

Greedy Choice

Commit to a locally best action backed by a proof that an optimum remains reachable.

Recognition signal

An exchange or staying-ahead argument protects every accepted choice.

Method

Give the invariant, choose safely and discard alternatives the proof covers.

Worked example

In a jump array, track the farthest reachable index across the scanned prefix.

Common mistake

A successful example does not prove that a greedy rule is safe.