The algorithms and data structures I reach for most, broken down by type. Each one has a description, when to use it, a step-by-step, working Python, and its complexity. These notes also back the top-level Algorithms tab, which organizes the full problem set by topic and shows implementations in Python, C++, Rust, and TypeScript.
C++-only companionSeven chapters covering arrays, graphs, search, dynamic programming, range queries, strings, mathematics, greedy algorithms, and games through recognition signals, invariants, and tested C++20 code.
Open the C++ pattern library →