“Know how to solve every problem that has been solved.” “What I cannot create, I do not understand.” — Richard Feynman

Competitive Programming

Courses

A structured climb toward top-ranked competitive programming. The site's algorithm pages are the Wikipedia-style reference; this course is the ordered path through them — each unit names what to learn, links the pages that teach it, and adds the contest-specific technique and practice the reference pages don't cover. Built to take a competent programmer to a strong CodeChef / Codeforces rating.

0 skills 0 questions ← whole tech tree
Competitive ProgrammingUnit 2 · Core data structures0/10 units cleared · 0/0 questions · 27 planned · ~11h
Unit 1

The contest loop

planned

Before any algorithm: the complexity budget, fast I/O, and the language toolkit that decides a third of your rating.

  • lessonThe 10⁸ rule: read constraints, pick the complexity that fitsplanned
  • lessonFast I/O and the contest template (C++ & Python)planned
  • lessonThe standard library is half the battle: what to reach forplanned
Unit 2

Core data structures

● you are here0/1

The structures every problem is secretly about: hash tables, heaps, ordered sets, and disjoint-set union.

  • readingReading — Union-Find (disjoint set union)20m
  • lessonHash maps & sets: membership, counting, and the anti-hash testplanned
  • lessonHeaps & priority queues: the top-k workhorseplanned
  • lessonOrdered sets & policy trees: when you need rank, not just presenceplanned
  • lessonDSU with rollback and small-to-large: beyond the textbookplanned
Unit 3

Sorting, searching, two pointers

0/3

Binary search is not about sorted arrays — it is about monotone predicates. Two pointers and sliding windows turn O(n²) scans into O(n).

Unit 4

Graphs I — traversal & shortest paths

0/4

BFS, DFS, and Dijkstra cover most contest graph problems. The skill is modeling: seeing the grid, the state machine, the implicit graph.

Unit 5

Dynamic programming

0/7

The single biggest rating divider. State design first, transitions second — then the classic shapes: knapsack, LIS, edit distance, and DP on structure.

Unit 6

Greedy & exchange arguments

0/1

Greedy is easy to code and hard to trust. The skill is the proof — the exchange argument that tells you it is safe, and the counterexample when it is not.

Unit 7

Number theory & combinatorics

0/3

GCD, sieves, modular arithmetic, and counting under a prime modulus — the math half of competitive programming.

Unit 8

Strings

0/3

Pattern matching in linear time, then hashing and the Z-function — the tools that make string problems tractable.

Unit 9

Range queries

0/5

Answer "what is the sum/min over [l, r]?" faster than scanning — the family that separates blue from purple: prefix sums, sparse tables, Fenwick, segment trees.

Unit 10

Graphs II — advanced structure

0/4

Minimum spanning trees, all-pairs paths, connectivity decomposition, and ancestor queries — the heavier graph machinery.

Unit 11

Advanced topics

planned

The purple-and-up toolbox: linear recurrences by matrix power, convolution by FFT, game theory, and a first taste of geometry.

  • lessonMatrix exponentiation: nth Fibonacci in O(log n)planned
  • lessonFFT/NTT in outline: multiply polynomials in n log nplanned
  • lessonGame theory: Sprague-Grundy and the nim-valueplanned
  • lessonComputational geometry primer: orientation, hull, sweepplanned
Unit 12

Contest craft

0/4

The meta-skill: reading a set, estimating difficulty, stress-testing a suspect solution, allocating time — and the deliberate path up the rating ladder.