Skip to main content

Practice · 3 of 3

The Half Proof

CHALLENGE
Difficulty: advanced+25 XP

**Scenario.** A greedy passes every random test up to n = 1000 that you generate. What is the correct next step before trusting it in a contest? **Which approach is the best fit? The program only needs to print the letter.** **A)** Submit it — random coverage at n = 1000 is strong evidence **B)** Write the one-sentence exchange/induction proof; if it fails on equal keys or dependencies, construct targeted adversarial cases **C)** Increase n to 10^5 and rerun random tests **D)** Trust it but implement the DP fallback anyway

Back to lesson: Practice: Greedy Proof Drills