Skip to main content

Practice · 2 of 3

Stress: Delete-One Checker

CHALLENGE
Difficulty: advanced+25 XP

**Bài toán.** Implement (and stress-test) the predicate: can at most one element be deleted from the array so it becomes non-decreasing? Candidate: a linear scan; oracle: try deleting every index. 4000 trials, seed 777, heavy ties (values 0–4). **A plausible candidate is provided — it counts violations and assumes ≤ 1 violation is fixable. Your differential loop must catch it.** Fix the candidate (delete the correct side; re-check).

Back to lesson: Practice: Stress Drill — Three Harnesses