Track 10 of 12 · Turn constraints into a method
Algorithmic Problem Solving
Practice the recurring search, traversal, sorting, and state-reuse patterns behind many programming problems. Focus on the invariant that makes each technique correct.
Builds on:Data Structures & Complexity
Ten concepts, in learning order
Each lesson assumes the ideas above it and prepares you for the ones below.
- 01Binary searchBinary search locates a target or boundary in an ordered search space by comparing at a midpoint and discarding the half that cannot contain the answer.
- 02Bubble sortBubble sort repeatedly compares adjacent elements and swaps inverted pairs, moving an extreme element to its final position on each complete pass.
- 03Merge sort vs quicksortMerge sort recursively sorts halves and merges them with predictable Theta(n log n) time, while quicksort partitions around pivots and is typically fast in place but can degrade to Theta(n^2) with poor partitions.
- 04Breadth-first searchBreadth-first search explores a graph in nondecreasing number of edges from a start vertex by processing a FIFO queue of discovered vertices.
- 05Depth-first searchDepth-first search explores one graph path as far as possible before backtracking, using recursion or an explicit LIFO stack to retain unfinished alternatives.
- 06Two pointersThe two-pointers technique maintains two positions whose coordinated movement eliminates candidates or summarizes a range without restarting a full scan.
- 07Sliding windowA sliding-window algorithm maintains an aggregate for a contiguous range and updates it as the boundaries move, reusing prior work instead of recomputing each range from scratch.
- 08MemoizationMemoization caches a function's result by the complete input state so repeated calls for the same state can reuse the result instead of recomputing it.
- 09Dynamic programmingDynamic programming solves a problem by defining reusable states, a recurrence between them, base cases, and an evaluation order so each relevant state is computed once.
- 10BacktrackingBacktracking incrementally builds candidate solutions, abandons a partial candidate as soon as it cannot lead to a valid solution, and undoes the latest choice before trying another.
Continue the curriculum
Next: Concurrency & Reliability
Understand how independently progressing tasks interact through shared resources, and how systems remain correct when timing, duplication, delay, and failure are unavoidable.
Open track 11