0

Greedy

Take the locally best option and prove it never hurts. Short code, hard proofs.

Newinterview weight 6018 problems0 visualisers
18
mastery
Attempts logged
0
Predicted success on the next one
33%
Solved here
0 / 18

What you actually need to hold in your head

  • An exchange argument justifies the choice
  • Sorting usually reveals the greedy order
  • Counterexample hunting is the debugging tool
  • When greedy fails, the answer is usually DP

Patterns in this topic

The trigger phrases are what you are training yourself to notice.

Greedy problems

Ordered by sheet phase, so the early ones are the highest signal.

0 / 18 solved
1
MGreedy
2
3
4
5
6
7
8
9
HGreedy
10
11
12
13
14
15
16
17
18