Skip to content
Roadmap · 2026 Edition

Data Structures
& Algorithms.

18 stations. 3 tracks. From Big-O and arrays to graphs and dynamic programming — at your own pace.

Foundations
~4h 0/6
Structures
~4.5h 0/6
Graphs
~5h 0/6
0 of 18 stations · ~0h of ~13h
Lines —
Foundations
Structures
Graphs
Stations —
Not started
Completed

The roadmap.

Three tracks. 18 stations. Click any node to open its detail. Mark complete as you go — your progress is saved locally.

    Play the algorithms.

    Seven stations on this map are fully playable — watch binary search, sorting, BFS, Dijkstra, and A* run step by step.

    Browse the algorithm games →

    Data Structures & Algorithms Roadmap 2026 — the full roadmap in text

    A written version of the interactive roadmap above — every station, what you'll learn, and a small thing to build — laid out for reading, reference and search.

    Foundations Start here

    F1. Big-O & Complexity

    Beginner · 30 min

    How to measure an algorithm by how its cost grows, not how long it happens to run. O(1), O(log n), O(n), O(n log n), O(n²) — recognising these lets you predict whether code scales to a million items before you ever run it.

    Skills: Time vs space complexity · Common growth classes · Amortised analysis · Best / average / worst case

    Build it: Take three solutions to the same problem and rank them by Big-O. Predict which wins at n = 1,000,000, then time them to check.

    ✓ Checkpoint: Explain why O(n) can beat O(log n) on real input, and what the notation deliberately hides.

    F2. Arrays & Strings

    Beginner · 30 min

    The workhorse structure: contiguous memory, O(1) random access, O(n) insert/delete in the middle. Most interview problems start here — in-place manipulation, reversals, rotations, and the index arithmetic everything else builds on.

    Skills: Random access & traversal · In-place edits · String building · Index math

    Build it: Reverse an array in place with two pointers, then rotate it by k positions using no extra memory.

    ✓ Checkpoint: Explain why inserting at the front of an array is O(n) and why that cost is invisible until it is not.

    F3. Hashing & Sets

    Beginner · 45 min

    Hash maps trade memory for O(1) average lookups. Frequency counts, de-duplication, and “have I seen this before?” checks become trivial. The single most useful trick for cutting an O(n²) brute force down to O(n).

    Skills: Hash maps & sets · Frequency counting · Collisions (basics) · The two-sum pattern

    Build it: Solve two-sum in O(n) with a hash map, then find the first non-repeating character in a string.

    ✓ Checkpoint: Explain what a hash set buys over a sorted array, and the case where the array wins.

    F4. Two Pointers & Sliding Window

    Intermediate · 45 min

    Two indices walking through a sequence — from opposite ends or as a fast/slow pair — crack a huge class of array and string problems in O(n) time and O(1) space. The sliding window is the same idea aimed at subarrays and substrings.

    Skills: Opposite-end pointers · Fast / slow pointers · Fixed & variable windows · In-place partitioning

    Build it: Find the longest substring without repeating characters using a sliding window backed by a set.

    ✓ Checkpoint: Explain how a sliding window turns an O(n²) scan into O(n), and what property the input must have.

    F5. Math & Sieves

    Intermediate · 40 min

    Number theory shows up constantly — primes, GCD, modular arithmetic. The Sieve of Eratosthenes finds every prime up to n by crossing out multiples, far faster than testing each number for primality.

    Skills: Primes & factorisation · GCD / LCM · Modular arithmetic · The Sieve

    Build it: Generate every prime under 1,000 with the Sieve, then work out why it runs in O(n log log n).

    ✓ Checkpoint: Explain why the sieve is faster than testing each number for primality, in terms of work reused.

    F6. Binary Search

    Intermediate · 45 min

    On sorted data, halve the search space every step — O(log n) instead of O(n). The pattern reaches far past arrays: any time the answer space is monotonic, you can “binary search on the answer.”

    Skills: Sorted-array search · Lower / upper bound · Search on the answer · Off-by-one safety

    Build it: Implement binary search with zero off-by-one bugs, then reuse it to find a square root to six decimals.

    ✓ Checkpoint: Write the binary search boundary condition from memory and say which off-by-one you get wrong most.

    Structures & Sorting Level up

    T1. Stacks & Queues

    Beginner · 30 min

    LIFO and FIFO — the two simplest abstract structures, yet they power undo systems, expression parsing, BFS, and scheduling. Half the battle is recognising that a problem is secretly a stack or queue problem.

    Skills: Stack (LIFO) · Queue / deque (FIFO) · Monotonic stack · Matching & parsing

    Build it: Validate balanced brackets with a stack, then build a min-stack that returns its minimum in O(1).

    ✓ Checkpoint: Explain what a monotonic stack maintains, and how that turns “next greater element” into one pass.

    T2. Linked Lists

    Intermediate · 40 min

    Nodes joined by pointers: O(1) insert/delete, but no random access. The classic playground for pointer manipulation — reversal, cycle detection, and merging two lists in order.

    Skills: Singly / doubly linked · Pointer reversal · Floyd cycle detection · Dummy-head trick

    Build it: Reverse a linked list iteratively, then detect a cycle with fast/slow pointers.

    ✓ Checkpoint: Explain why the fast/slow pointer finds a cycle, and why the meeting point is not the cycle start.

    T3. Recursion & Backtracking

    Intermediate · 50 min

    A function that calls itself, peeling a problem down to a base case. Backtracking adds “try, recurse, undo” to explore every configuration — permutations, subsets, N-queens, Sudoku.

    Skills: Base case & recursion · The call stack · Backtracking template · Pruning

    Build it: Generate all subsets of a set, then all permutations. Add pruning to place 8 queens without conflicts.

    ✓ Checkpoint: Explain what backtracking undoes and why forgetting the undo poisons every later branch.

    T4. Sorting

    Intermediate · 50 min

    Ordering data unlocks binary search, two-pointer sweeps, and greedy methods. Merge sort guarantees O(n log n) with a stable divide-and-conquer; quicksort is usually faster in practice with in-place partitioning.

    Skills: Divide & conquer · Merge sort (stable) · Quicksort & pivots · When to sort first

    Build it: Implement merge sort, then quicksort, and compare how each behaves on already-sorted and reversed input.

    ✓ Checkpoint: Explain what stability means in a sort and give a case where losing it produces a wrong answer.

    T5. Trees & BSTs

    Intermediate · 50 min

    Hierarchical nodes with children. Binary search trees keep data ordered for O(log n) search and insert; traversals — in-order, pre-order, post-order — visit every node in a meaningful sequence.

    Skills: Binary trees · BST invariant · DFS traversals · Balanced trees (AVL / RB) intuition

    Build it: Do an in-order traversal of a BST (it yields sorted order), then check whether an arbitrary tree is a valid BST.

    ✓ Checkpoint: Explain why an unbalanced BST degenerates to a list, and what input causes it.

    T6. Heaps & Priority Queues

    Intermediate · 45 min

    A binary heap gives O(log n) insert and O(1) peek of the smallest (or largest) element — the engine behind priority queues, “top-k” problems, and Dijkstra’s frontier.

    Skills: Min / max heap · Heapify in O(n) · Top-k pattern · Priority queue uses

    Build it: Find the k largest values in a stream using a min-heap of size k, and explain why it is O(n log k).

    ✓ Checkpoint: Explain why a heap gives you the minimum in O(1) but the sorted order still costs O(n log n).

    Graphs & Advanced Go further

    P1. Graph Foundations

    Intermediate · 40 min

    Vertices and edges model networks, maps, dependencies, and state spaces. Representation matters: an adjacency list for sparse graphs, a matrix for dense ones — the choice changes the cost of every traversal.

    Skills: Adjacency list vs matrix · Directed / weighted edges · Degree & connectivity · Modelling problems as graphs

    Build it: Build an adjacency list from an edge list, then count the connected components.

    ✓ Checkpoint: Explain when an adjacency matrix beats a list, in terms of density rather than preference.

    P2. BFS & Flood Fill

    Intermediate · 45 min

    Breadth-first search explores level by level with a queue — giving the shortest path in unweighted graphs and powering flood fill, maze solving, and “nearest” queries.

    Skills: Queue-based BFS · Shortest path (unweighted) · Flood fill · Multi-source BFS

    Build it: Find the shortest path through a grid maze with BFS, then flood-fill a region of connected cells.

    ✓ Checkpoint: Explain why BFS finds the shortest path on an unweighted graph and DFS does not.

    P3. DFS & Topological Sort

    Intermediate · 45 min

    Depth-first search dives down each branch with recursion or a stack. It detects cycles, finds components, and — on a DAG — produces a topological order for scheduling dependencies.

    Skills: Recursive / iterative DFS · Cycle detection · Topological sort · Connected components

    Build it: Topologically sort a build-dependency graph, and detect when a cycle makes ordering impossible.

    ✓ Checkpoint: Explain what a topological order guarantees and what its existence tells you about the graph.

    P4. Shortest Paths

    Advanced · 55 min

    When edges carry weights, BFS is not enough. Dijkstra greedily expands the cheapest frontier with a heap; it is the backbone of routing, networks, and every “least-cost” problem.

    Skills: Weighted edges · Dijkstra + heap · Edge relaxation · Negative edges (Bellman-Ford)

    Build it: Run Dijkstra on a weighted road network to find the cheapest route, using a priority queue for the frontier.

    ✓ Checkpoint: Explain why Dijkstra breaks on negative edges, and which algorithm you reach for instead.

    P5. Heuristic Search (A*)

    Advanced · 50 min

    A* speeds up shortest-path search by adding a heuristic — an estimate of the distance still to go — so it aims toward the goal instead of expanding evenly. With an admissible heuristic it stays optimal.

    Skills: Heuristics & admissibility · f = g + h · A* vs Dijkstra · Greedy best-first

    Build it: Pathfind across a terrain grid with A* and a Manhattan heuristic, then compare how many nodes it expands versus Dijkstra.

    ✓ Checkpoint: Explain what makes an A* heuristic admissible, and what an inadmissible one costs you.

    P6. Dynamic Programming

    Advanced · 60 min

    DP solves a problem by caching its overlapping subproblems — top-down with memoisation or bottom-up with a table. Once you spot the recurrence, exponential brute force collapses to polynomial time.

    Skills: Overlapping subproblems · Memoisation vs tabulation · State & transitions · Classic DPs (knapsack, LCS, edit distance)

    Build it: Solve climbing-stairs with memoisation, re-derive it bottom-up, then move on to the 0/1 knapsack.

    ✓ Checkpoint: State the DP state for a problem you solved, and say why that state is sufficient.

    Data Structures & Algorithms roadmap — frequently asked questions

    The common questions before you start — how long it takes, whether to follow it in order, and how it stays current.

    How long does this roadmap take?

    It runs 18 stations across three tracks, and it is self-paced — so most people work through it over a few weeks, an evening or a single station at a time. There is no clock; the map shows what is left.

    Do I have to follow the stations in order?

    The tracks are ordered so each station builds on the one before, and following them start to finish is the intended path. But every station also stands alone — if you already have the foundations, jump straight to the part you need.

    Is it free?

    Yes. The whole roadmap, the interactive map, and every handbook, lab, and challenge it links to are free and open — no sign-up and no paywall.

    How is this roadmap kept current?

    It teaches the durable fundamentals first, then the tooling and the AI-era shifts on top — so most of it stays relevant as individual tools churn, and it is revised as the field itself changes.

    Who is this roadmap for?

    Anyone stepping into or leveling up in this area — whether you are switching in, early-career, or a senior filling gaps. Start where you are; the map shows what is left.

    Finished this one? 0 / 31 Roadmaps done

    Explore the topic

    See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

    More Roadmaps