From reading input and estimating time complexity to brute force, bit brute force, binary search, prefix sums, dynamic programming, and graph techniques. Across 30 lessons you'll get to the point where you "look at the constraints, pick an approach, and finish writing it within the time limit." Every lesson is an exercise in the form "task → implementation steps → sample solution → extra challenges," and every piece of code and every timing was actually run on Python 3.14.2.
The 30 lessons are split into 6 chapters. We recommend going in order from chapter 1,
but feel free to dip into whatever interests you.
Note: all 30 lessons include a "task → implementation steps → sample solution → extra challenges" exercise. No lesson is explanation only.
Note: the samples run right in your browser (they use only the standard library). For large benchmarks, try them with python3 on your own machine.
We nail down how to read input and how to work backward from the constraints to the complexity you can afford. We finish with overflow, floating-point numbers, and a pre-submission checklist, so you can catch problems yourself before they cost you.
First, you learn to write solutions that simply try everything: nested loops, bit brute force, permutations, recursion, and finally pruning that makes N-Queens 65 times faster.
You'll learn three ideas: binary search on the answer, never moving the right end backward, and preprocessing once to reuse many times. We measure the two-pointer technique running 1,358 times faster, and prefix sums making a difference of whole seconds.
Over 7 lessons, you practice deciding "what to store in dp." We cover knapsack, 2D DP, interval DP, and bitDP, comparing each one against a naive solution every time.
Starting from adjacency lists, we move on to four shortest-path tools, Union-Find, minimum spanning trees, and topological sort. They're all connected by a single idea: "process things in the right order."
You'll walk through one problem end to end, choosing an approach from the constraints, then solve three classic problems in a row. We wrap up by building a tool that automatically finds counterexamples and shrinks them.
Once you've finished all 30 lessons, it's time to strengthen these tools from a different angle. Measure the complexity of real-world code in Algorithms for Beginners, build your ability to read formulas in Math for Programmers for Beginners, and solidify how you write code itself in Python for Beginners. Each one picks up where this course leaves off. A membership unlocks every course.