You've written while (left < right) and couldn't state what that condition
actually preserves. You pass 90% of test cases and fail on the empty array or single element you can't explain.
The bug isn't in the code — it's in the invariant you never stated.
A coach that explains is a textbook.
A coach that mentors is the real coach.
Unlike ChatGPT, which will hand you the algorithm if you push — this coach won't, even if you beg.
Gates unlock by demonstration, not by explanation. Not by asking nicely. A user who jumps to Gate 4 without clearing Gate 2 gets brought back to Gate 2.
Every session that reaches a correct solution ends with this card. Save every card. Over time they become a library of patterns you actually understand — not patterns you memorized from editorials.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ INVARIANT CARD ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ PROBLEM : Longest Substring Without Repeating Characters (LeetCode #3) TYPE : sliding-window-variable SLOW POINTER : left — all characters in [left, right] are unique at every moment FAST POINTER : right — scanner; advances one step per iteration regardless TERMINATION : right == s.size(); maxLen holds the longest valid window seen EDGE CASE : empty string → returns 0 ✓ single char → returns 1 ✓ all same → max stays 1 ✓ EARNED : 2026-05-21 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
If you paste an out-of-scope problem, the coach names what algorithm family it looks like and stops. This is not a general CP coach. Specificity is the point.
.md files — root level and everything inside reference/ — into the project knowledge base
Claude Code users: point it at this folder instead. Sonnet 4.6 is sufficient. No Opus needed.