Course · 7 lessons ~48 hr Advanced

Algorithm Design Paradigms & Analysis

Step back from specific algorithms to master the paradigms — divide and conquer, greedy, dynamic programming, randomization, amortized analysis, NP-completeness. This module teaches you how to design new algorithms, not just implement known ones. N+1 query detection is an algorithmic problem — tools like bullet gem use graph analysis to detect dependency patterns in your queries. Rails caching strategies (fragment caching, Russian doll caching) are approximation algorithms: they trade perfect accuracy for O(1) lookups. Understanding NP-completeness helps you recognize when a feature request is computationally intractable. When a product manager asks "can we find the optimal assignment of N tasks to M workers?" and N and M are large, you can explain why an approximation is necessary. Algorithm design paradigms also appear in background job design: divide-and-conquer for splitting large imports into parallel chunks, greedy algorithms for task scheduling in Sidekiq.

reading · we frame, you read MIT or the canonical taught · we author, no canonical fits ↺ spirals back to earlier lessons
Course locked

Complete String Algorithms & Pattern Matching first.

This course unlocks once you've finished its prerequisite. Open prerequisite →

7 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.