Course 16 · Craft
Algorithms
Why it is slow, and what to do.
Data structures and algorithms with the complexity measured rather than asserted: every lab counts its own operations and the page names the growth rate.
0 of 24 lessons finished — nothing yet
The syllabus
24 lessons,
in the order they build on each other.
What Big-O measures
Growth, not speed — and the four things the notation deliberately throws away.
Measuring growth
Count the operations, fit the curve, and let the machine name the complexity.
Arrays
Contiguous memory: why the index is free, the insert is not, and the array still wins.
Linked lists
Nodes and pointers, the O(1) insert — and why the array usually beats it anyway.
Stacks and queues
Two disciplines, three implementations, and the ring buffer that makes a queue free.
Hash tables
Hashing, collisions and load factor — where "constant time" actually comes from.
Recursion
Base case, call stack, and the mechanical way to turn any recursion into a loop.
The simple sorts
Selection, bubble and insertion — measured, so you can see the n² for yourself.
Merge sort
Divide, conquer, merge: the first O(n log n), and the one that stays stable.
Quicksort
Partitioning in place, the pivot that matters, and the worst case nobody mentions.
Sorting in practice
What your language actually runs, sorting by a key, and why stability decides.
Binary search
Twelve lines that are wrong in four places — and the boundary form you actually need.
Two pointers and windows
The pattern that turns a nested loop into one pass over the data.
Trees
Terminology, the four traversals, and what recursion looks like on a shape.
Binary search trees
Search, insert, delete — and the input that turns the tree into a linked list.
Keeping a tree balanced
Rotations, the red-black idea, and why a database uses a B-tree instead.
Heaps and priority queues
An array that is secretly a tree: push, pop, heapify and the top-k pattern.
Tries
Prefix trees: autocomplete, spell-checking, and the space they cost.
Graphs
Adjacency list against matrix, directed and weighted — choosing the representation.
Breadth first, depth first
One queue, one stack, and the shortest path in an unweighted graph.
Shortest paths
Dijkstra with a heap, why negative weights break it, and what to use then.
Dynamic programming
Overlapping subproblems: memoise it, then turn it into a table.
Greedy and backtracking
When taking the best step works, when it does not, and how to search properly.
Practice: make it fast
One correct but unusable function. Find the complexity, then bring it down two orders.
Keep going
The other courses.
HTML
The document, the elements and the meaning behind them. Everything else on the web is layered on top of this.
CSS
Selectors, the box model, layout with flexbox and grid, and motion that has a reason to move.
JavaScript
Values, functions, the DOM, events and asynchronous work — written so you can debug it later.