Practice · 1 of 3
Stress: Segment Sum Oracle
CHALLENGE
Difficulty: advanced+25 XP
**Bài toán.** Two implementations of max segment sum are compiled below:
a candidate and an O(n²) oracle. Run a differential harness of 3000 random
trials (seeds 12345..., lengths 1–9, four value distributions) and print
OK 3000 if every trial agrees, or MISMATCH trial <t> at the first
disagreement.
**The candidate below is deliberately broken in one small way — your
harness must expose it.** Fix it so the full loop prints OK.
Press Submit to check your solution.
Back to lesson: Practice: Stress Drill — Three Harnesses