Practice
Learn
Work through the LeetCode Top Interview 150 question by question — or follow the guided paths below. Every traced question runs in the visualizer with solutions in JavaScript, TypeScript, and Python. Progress is saved on this device.
Built to help you learn
DSA Lab exists for one reason: to help students and learners actually understand algorithms — by watching every step, not just memorizing the answer. It's free, and it's made with that goal in mind.
One honest note: visualizations are generated from real code traces, and we check them against known answers — but no tool is perfect. If a step ever looks wrong or confusing, it probably is. Tell us and we'll fix it.
Question bank
Top Interview 150
The official LeetCode interview-prep list — 150 classic problems across 23 topics, straight from the study plan. Expand a topic to see its questions; tick them off as you solve them. Each question links to LeetCode, and every one with a Visualize button opens instantly in the tracer with the canonical solution and its example input already loaded. More questions get templates in every wave.
0 of 150 solved
- JS · TS · PyArrayTwo PointersSorting
- ArrayTwo Pointers
- ArrayTwo Pointers
- ArrayTwo Pointers
- ArrayHash TableDivide & Conquer
- ArrayMathTwo Pointers
- JS · TS · PyArrayGreedy
- ArrayGreedy
- ArrayGreedy
- ArrayGreedy
- ArraySortingCounting
- DesignHash TableRandomization
- ArrayPrefix Sum
- ArrayGreedy
- ArrayGreedy
- JS · TS · PyArrayTwo PointersStack
- JS · TS · PyStringHash Table
- StringHash Table
- String
- StringTrie
- StringTwo Pointers
- String
- StringTwo Pointers
- StringSimulation
Guided paths
Learning paths
Curated templates you can trace in the visualizer, with checkpoint quizzes. Work through the paths in order — or jump straight to any topic. A template counts as mastered once you've run it and answered its checkpoint quiz.
0 of 9 paths complete
- 01
Arrays
Sorting and the foundation of algorithm state
See how loops walk array indices, how swaps move values, and how the same algorithm reads differently in JavaScript and Python.
Templates: Bubble sort · Bubble sort · Bubble sort
0 of 3 templates mastered0% - 02
Two pointers
Binary search and narrowing the search space
Left/right and slow/fast pointers shrink what an algorithm has to look at. Learn binary search plus pointer techniques on lists.
Templates: Binary search · Binary search · Middle of a linked list · Nth node from the end
0 of 4 templates mastered0% - 03
Sliding window
Subarray and substring problems in one pass
A window that grows and shrinks across the input solves many O(n) substring problems. Watch the window bounds and the map of counts move together.
Templates: Sliding window · Longest repeating character replacement
0 of 2 templates mastered0% - 04
Recursion
Decompose a problem into smaller versions of itself
Watch recursive calls push onto the call stack, branch through the graph, and unwind. The checkpoint quizzes here test whether you can predict each call's effect.
Templates: Recursive depth-first search
0 of 1 templates mastered0% - 05
Trees
Recursive structure, level by level
Binary trees are the classic recursion workout: mirror the tree, compute depth, and watch node pointers move down each branch.
Templates: Invert binary tree · Maximum depth of binary tree
0 of 2 templates mastered0% - 06
Graphs
Traversal order and visited sets
DFS and BFS order decide everything on graphs. Watch the frontier grow, nodes get visited, and grid problems behave like graph problems.
Templates: Depth-first search · Number of islands
0 of 2 templates mastered0% - 07
Dynamic programming
Coming soonMemoize the past to answer the future
Coming soon — DP tables and memoization trees are in the works. Check back for the first templates.
- 08
Linked lists
Rewiring pointers instead of moving values
Reversing, merging, and cycle detection all come down to carefully reassigning next pointers. Watch the node links rewire step by step.
Templates: Reverse a linked list · Detect cycle (Floyd's algorithm) · Merge two sorted lists
0 of 3 templates mastered0% - 09
Stacks & hashing
Ordering with a stack, lookup with a map
A stack keeps the right order for balanced parentheses; a hash map turns a two-pass search into a single pass. See both structures in action.
Templates: Valid parentheses · Two sum · Two sum
0 of 3 templates mastered0% - 10
Matrices
Row, column, and cell coordinates
Two-dimensional state: spiral traversals, marking rows and columns, and indexing cells by [row][col].
Templates: Spiral matrix · Set matrix zeroes
0 of 2 templates mastered0%