# Competitive Programmer's Handbook

written by Antti Laaksonen

The purpose of this book is to give the reader
a thorough introduction to competitive programming.
The book is especially intended for students
who want to learn algorithms and possibly participate
in the International Olympiad in Informatics (IOI)
or in the International Collegiate Programming Contest (ICPC).

The book is still under construction, but it is almost ready.
You can send feedback on the book to
ahslaaks@cs.helsinki.fi – all corrections and
suggestions are appreciated.

Download the book (PDF)

## Table of contents

### Part 1: Basic techniques

**Introduction**
**Time complexity**
**Sorting**
**Data structures**
**Complete search**
**Greedy algorithms**
**Dynamic programming**
**Amortized analysis**
**Range queries**
**Bit manipulation**

### Part 2: Graph algorithms

**Basics of graphs**
**Graph traversal**
**Shortest paths**
**Tree algorithms**
**Spanning trees**
**Directed graphs**
**Strong connectivity**
**Tree queries**
**Paths and circuits**
**Flows and cuts**

### Part 3: Advanced topics

**Number theory**
**Combinatorics**
**Matrices**
**Probability**
**Game theory**
**String algorithms**
**Square root algorithms**
**Segment trees revisited**
**Geometry**
**Sweep line algorithms**