Algorithm patterns

Understand algorithm patterns visually.

Step through arrays, trees, graphs, heaps, and DP tables with synchronized code and state.

Sliding WindowArray
30
11L
72
23R
44
85
16
57
1while (right < n) {
2 sum += arr[right];
3 while (sum > target) {
4 sum -= arr[left];
5 left++;
6 }
7 right++;
8}
left1
right3
sum10
target13
maxLen3
->Expand the right pointer because the current sum is below target.
Why this works

Visual patterns stick.

See the invariant

Watch what stays true at every step: the window boundary, sorted prefix, visited set, or table dependency.

Track state changes

Variables update beside the visualization, so left++, queue push, and table fill decisions become visible.

Connect code to movement

Highlighted code lines map to visual actions, closing the gap between reading a solution and understanding it.

Interview prep

Built for the technical interview.

Pattern recognition

See patterns organized by data structure, technique, and difficulty.

Step-by-step debugging

Step forward and backward through an algorithm with full state visible.

Practice links

Move from a pattern page to related interview questions when you are ready.

Progress tracking

Track studied patterns and return to unfinished work without hunting.

Review interview questions

Start learning patterns.

Open Algorithm Studio and step through your first visualization.