Algorithms track

Algorithms & data structures

A step-by-step path through algorithms and data structures. Each lesson explains what a technique is and when to use it, traces it by hand, then shows the code in JavaScript and Python.

0 of 50 lessons complete50 published ยท 10 modules

Recommended order. Go top to bottom. Modules 1 to 3 are the base everything else stands on. After that, trees and graphs can be done in either order, but finish module 8 before dynamic programming.

  1. Foundations

    5 lessons

    What an algorithm is, how to measure one, and how to start when you are stuck.

    1. What Is an Algorithm12 min
    2. Big-O Notation14 min
    3. Recursion14 min
    4. Math for Algorithms15 min
    5. How to Approach a Problem14 min
  2. Arrays, Strings & Hashing

    6 lessons

    The everyday tools: arrays, strings, hash maps, and the patterns built on them.

    1. Arrays13 min
    2. Strings14 min
    3. Hash Tables15 min
    4. Two Pointers14 min
    5. Sliding Window14 min
    6. Prefix Sums14 min
  3. Linked Lists, Stacks & Queues

    4 lessons

    Linked lists, stacks and queues, and the problems each one is suited to.

    1. Linked Lists20 min
    2. Stacks14 min
    3. Queues and Deques12 min
    4. Monotonic Stack15 min
  4. Graphs: Traversal

    4 lessons

    How to represent a graph and traverse it with breadth-first and depth-first search.

    1. Graph Basics15 min
    2. Breadth-First Search19 min
    3. Depth-First Search14 min
    4. Topological Sort13 min
  5. Graphs: Paths & Connectivity

    4 lessons

    Shortest paths, connected groups and cheapest networks.

    1. Union-Find14 min
    2. Dijkstra's Algorithm15 min
    3. Bellman-Ford and Floyd-Warshall15 min
    4. Minimum Spanning Trees18 min
  6. Problem-Solving Techniques

    5 lessons

    General techniques that apply to many problems, such as greedy choices, backtracking and divide and conquer.

    1. Backtracking17 min
    2. Greedy Algorithms14 min
    3. Divide and Conquer13 min
    4. Intervals14 min
    5. Bit Manipulation14 min
  7. Dynamic Programming

    6 lessons

    How to break a problem into subproblems, store their answers and build the final answer from them.

    1. Introduction to Dynamic Programming14 min
    2. 1D Dynamic Programming15 min
    3. DP on Grids16 min
    4. Knapsack18 min
    5. DP on Strings15 min
    6. Longest Increasing Subsequence18 min
  8. Advanced Topics

    3 lessons

    Specialised structures and techniques for problems the basic tools solve too slowly.

    1. String Matching17 min
    2. Segment Trees and Fenwick Trees14 min
    3. Designing Data Structures19 min