Tactic mode · Intuition builder

Don't memorize the answer. Build the instinct.

Play with one decision, code one line, assemble the pattern, run it, then adapt it to a new problem.

0XP
0%Mastery
0Stages
SL
Array / StringMedium

Sliding Window

Maintain a contiguous window boundary across arrays to reduce O(N²) to O(N)

Intuition coach

Grow a useful contiguous region, repair it only when it breaks, then measure it.

O(N) timeO(min(N, M)) space

Stage 1 · Play

Make one useful move

Start with the behavior of the pattern. The name and code can wait.

Mental animation

Longest Substring Without Repeating Characters

Grow a useful contiguous region, repair it only when it breaks, then measure it.

Keep true

The state describes exactly the elements between left and right.

A repeated character makes the current window invalid. What now?