Concept Lab

Visual Pattern Walkthroughs

Select any pattern below to inspect line-by-line internal memory states, pointer movements, tree traversals, and DP grids with custom input values.

Two Pointers

Time: O(n) | Space: O(1)
0 / 5

Converging or parallel pointers navigating sorted arrays or palindromes in O(n) time.

2 Easy2 Medium1 Hard

Sliding Window

Time: O(n) | Space: O(k) or O(1)
0 / 5

Dynamically expanding and contracting contiguous subarrays/substrings.

2 Easy2 Medium1 Hard

Linked Lists

Time: O(n) | Space: O(1)
0 / 5

In-place pointer manipulation, reversals, and fast/slow pointer cycles.

2 Easy2 Medium1 Hard

Stacks & Queues

Time: O(n) | Space: O(n)
0 / 5

LIFO and FIFO data buffers with Monotonic Stack patterns for next-greater elements.

2 Easy2 Medium1 Hard

Trees & BSTs

Time: O(n) | Space: O(h) where h is tree height
0 / 5

Hierarchical node traversal: DFS (Pre/In/Post-order) and BFS Level-Order.

2 Easy2 Medium1 Hard

Binary Search

Time: O(log n) | Space: O(1)
0 / 5

Logarithmic search space reduction on sorted ranges or monotonic predicates.

2 Easy2 Medium1 Hard

Graph Traversals

Time: O(V + E) or O(R * C) | Space: O(V) visited set / queue
0 / 5

Network explorations, 2D Grid Islands, Breadth-First and Depth-First Search.

2 Easy2 Medium1 Hard

Dynamic Programming

Time: O(n) or O(n * m) | Space: O(n) or O(n * m)
0 / 5

Breaking problems into overlapping subproblems with memoization and tabulation grids.

2 Easy2 Medium1 Hard

Backtracking

Time: O(2^n) or O(n!) | Space: O(n) recursion depth
0 / 5

Exhaustive combinatorial exploration: Choice, Constraint, Goal, and Undo.

2 Easy2 Medium1 Hard