DSA Mastery
Data structures, Big-O and the patterns behind interview problems.
56 levels with step-through visualizers, quizzes and 153 coding problems checked against test cases.
- Units
- 12
- Lessons
- 56
- Coding problems
- 153
- Visualizers
- 56
- Pattern pages
- 22
Free: units 1 to 2 (9 lessons). Units 3 to 12 with DevArcade Pro.
What you'll learn
- Boot CampThe JavaScript you need, and how to measure speed
- Linear LandArrays, strings, maps, lists, stacks, queues
- Thinking LoopsRecursion and sorting
- Branching ForestTrees, BSTs, heaps, graphs and tries
- WorkshopBits, math and designing your own data structures
- Pointer PassPatterns 1–3: move indices cleverly
- Counting CavesPatterns 4–7: count, scan and precompute
- Choice CanyonPatterns 8–10: sort, choose, keep the best
- Explorer PeaksPatterns 11–14: walk every path
- Graph SummitDependencies, groups, weighted paths and spanning trees
- Expert RidgeString matching and range queries
- Boss CastlePattern 15: dynamic programming
Course outline
12 units and 56 lessons. Each lesson has a short read with examples you run, a quiz, and coding problems tested in your browser; most have a step-through visualizer.
- Free
Unit 1:Boot Camp
The JavaScript you need, and how to measure speed
- JS Toolkit for DSA Arrays, loops, objects, Map and Set: the only JavaScript most interview problems need.2 problems
- Big-O Notation How to describe the speed of an algorithm as the input grows.2 problems
-
- Free
Unit 2:Linear Land
Arrays, strings, maps, lists, stacks, queues
- Arrays The workhorse structure: instant reads, costly middle inserts.2 problems
- Strings Arrays of characters, with one catch: you cannot change them in place.2 problems
- Hash Maps & Sets Trade a little memory for instant "have I seen it?" answers.2 problems
- Hashing Internals: Build a Hash Map How a Map finds keys in O(1): hash functions, buckets, collisions, load factor and resizing.3 problems
- Linked Lists Nodes holding a value and a pointer to the next node.2 problems
- Stacks Last in, first out. The most recent thing is always on top.2 problems
- Queues First in, first out. Fair lines, task schedulers and BFS.2 problems
-
- Pro
Unit 3:Thinking Loops
Recursion and sorting
- Recursion Solve a problem by solving a smaller copy of it.2 problems
- Sorting Basics Put things in order, then many problems become easy.2 problems
- Quick Sort, Quickselect & Counting Sort Partition around a pivot, find the k-th element in O(n) on average, and beat n log n for small integers.3 problems
- Analysing Recursive & Amortized Cost Recursion trees, the four recurrences to know, amortized O(1), and the hidden costs in everyday JavaScript.2 problems
-
- Pro
Unit 4:Branching Forest
Trees, BSTs, heaps, graphs and tries
- Binary Trees Nodes with up to two children. Recursion was made for them.2 problems
- Binary Search Trees Smaller to the left, bigger to the right, at every node.2 problems
- Heaps A tree packed into an array that always knows its minimum.2 problems
- Heap Sort and Stable Sorting Sort in place in O(n log n) with a heap, sort nearly sorted data with a small heap, and know when order among equals matters.3 problems
- Graphs Nodes and edges: maps, networks, dependencies, grids.2 problems
- Tries A tree of letters for lightning-fast prefix search.2 problems
- Trie II: Wildcards and Grid Words Wildcard search by branching, many-word grid search pruned by a trie, and prefix replacement.3 problems
-
- Pro
Unit 5:Workshop
Bits, math and designing your own data structures
- Bit Manipulation Numbers as rows of bits: AND, OR, XOR and shifts, the tricks built on them, and bitmasks as sets.3 problems
- Math for Coding Interviews Remainder against modulo, gcd and lcm, primes and the sieve, fast exponentiation and safe integers.3 problems
- Designing Data Structures: LRU Cache Turn required complexities into a design: a min stack, an LRU cache (map + doubly linked list), a time map.3 problems
-
- Pro
Unit 6:Pointer Pass
Patterns 1–3: move indices cleverly
- Two Pointers Two indices walk toward each other (or together) to skip useless pairs.3 problems
- Fast & Slow Pointers A hare that moves twice as fast finds cycles and middles in one pass; a dummy head removes edge cases.3 problems
- Sliding Window Keep a running window over a range and slide it instead of recomputing.3 problems
- Binary Search Halve the search space every step: O(log n).3 problems
- Binary Search on the Answer Boundaries with lower/upper bound, rotated arrays, and binary searching a monotonic yes/no question.3 problems
-
- Pro
Unit 7:Counting Caves
Patterns 4–7: count, scan and precompute
- Frequency Counting Count everything once in a map, then answer questions instantly.3 problems
- Matrix Traversal Walk a 2D grid in the order the problem needs: rows, columns, diagonals, spirals.3 problems
- Matrix II: Rotate, Zero and Search Rotate an image in place, zero rows and columns with O(1) extra space, and search a sorted grid from a corner.3 problems
- Monotonic Stack A stack kept in sorted order answers "next greater / smaller" in O(n).3 problems
- Monotonic Queue: Window Maximum A deque of indexes, decreasing front to back, gives the maximum of every window in O(n).3 problems
- Prefix Sum Precompute running totals once, answer any range sum in O(1).3 problems
-
- Pro
Unit 8:Choice Canyon
Patterns 8–10: sort, choose, keep the best
- Overlapping Intervals Sort by start time, then merge or compare neighbours.3 problems
- Greedy Make the best-looking choice now and never look back, when that provably works.3 problems
- Greedy II: Jumps, Circuits, Intervals Three greedy classics with the argument that makes each one correct.3 problems
- Top K Elements Keep only the k best candidates in a heap as you scan.3 problems
- Two Heaps: Running Median A max-heap for the lower half and a min-heap for the upper half give the median of a stream in O(log n).2 problems
-
- Pro
Unit 9:Explorer Peaks
Patterns 11–14: walk every path
- Backtracking Choose, explore, un-choose: systematically try every possibility.3 problems
- Backtracking on Grids & Constraints Mark, explore, restore on a grid; O(1) constraint checks for N-Queens; prune and skip duplicates.3 problems
- Binary Tree Traversal Preorder, inorder, postorder: three orders, one recursive shape.3 problems
- Tree Recipes: Invert, Diameter, LCA Return one thing while tracking another: height and diameter, path sums, and the lowest common ancestor.3 problems
- Depth-First Search Go as deep as you can, then back up. Recursion or a stack.3 problems
- Breadth-First Search Explore in rings of distance with a queue. Finds shortest paths.3 problems
-
- Pro
Unit 10:Graph Summit
Dependencies, groups, weighted paths and spanning trees
- Topological Sort Order tasks so every prerequisite comes first, and detect when a cycle makes that impossible.3 problems
- Union-Find (Disjoint Sets) Group items into sets and ask "same set?" in near-constant time, even while edges keep arriving.3 problems
- Weighted Shortest Paths Dijkstra for non-negative weights, Bellman-Ford for negative ones, stop limits and negative cycles.3 problems
- Graph Extras: Many Sources, Two Colours, All Pairs Multi-source BFS, bipartite checks, Floyd-Warshall for all pairs, and 0-1 BFS with a deque.4 problems
- Minimum Spanning Tree Connect every node for the least total weight: Kruskal sorts edges and uses union-find; Prim grows a tree.2 problems
-
- Pro
Unit 11:Expert Ridge
String matching and range queries
- String Matching: KMP and Rolling Hash Find a pattern in a text in O(n + m) with KMP's prefix function, or with a rolling hash.3 problems
- Range Queries: Fenwick and Segment Trees Answer range sums and minimums while the array keeps changing, in O(log n) per operation.3 problems
-
- Pro
Unit 12:Boss Castle
Pattern 15: dynamic programming
- Dynamic Programming Solve each small subproblem once, store it, build the big answer from it.4 problems
- Knapsack DP Take it or leave it: 0/1 and unbounded knapsack, subset sums, and counting the ways to make change.3 problems
- Sequence DP: Kadane, LIS, LCS Best subarray, longest increasing subsequence, longest common subsequence and edit distance.4 problems
- Interval DP & DP on Trees Fill a table by substring length for palindromes, and return tuples up a tree for house robber III.3 problems
-
Start DSA Mastery for free
Enroll for free and units 1 and 2 are yours. DevArcade Pro opens every unit of every course, including new ones as they launch, monthly or yearly.