**Total Chapters**:

8

**Number of Pages**:

262+4 (cover)

**Release Date**:

1 August 2011

**Translation**:

N/A

**Selling price (Printed)**

This project has been retired

**Selling price (eBook)**

CP2 is free since 2020, read it here

**Book Sales Status at lulu.com**

Average daily sales: 1614/1095 (2011-2014) ~= 1.47 book(s)/day.

- Collection of hundreds more Ad Hoc problems with hints to kick start your training programme
- More contest-related exercises :)
- More persuasive writing that the world of competitive programming is fun
- More balanced viewpoint: C++ vs Java, ICPC vs IOI
- Lots of footnotes in the second edition that gives more insights on the stuffs being discussed in the body text

- NEW in 2011: Discussion of lightweight set of Boolean (bitmask technique). This technique is important for competitive programmers and will be used several times in various sections of this book
- NEW in 2011: Short discussion on implicit graph
- NEW in 2011: Fenwick Tree (Binary Indexed Tree), uses bit manipulation
- More conceptual exercises

- More speed up tips to improve your solution, (especially the brute force solution)
- More Divide and Conquer examples, clearer explanation of 'Binary Search the Answer' technique
- More Greedy example: interval covering problem
- Clearer explanation of DP technique: the steps required to come up with a DP solution, especially the bottom-up version
- Reconstructing the optimal DP solution
- O(n log k) solution for LIS problem
- 0-1 Knapsack/Subset Sum
- DP TSP (bitmask technique again)

- Reorganization of graph sections (more reader friendly now)
- Prim's algorithm, Minimax/Maximin problem
- Clearer explanation of the 'TopCoder' style Dijkstra's implementation
- More application of Floyd-Warshall algorithm: Arbitrage
- Clearer explanation of Edmonds-Karp max flow algorithm
- Training to identify the flow graph of a problem solvable with max flow
- DP as a traversal of (implicit) DAG
- One more special graph: Eulerian Graph
- Augmenting Path Bipartite Matching algorithm
- A chapter with lots of short profiles of algorithm inventors (new feature of this book)

- Much more mathematics problems
- Combinatorics section expanded: Binomial Coefficients, Catalan Numbers, principle of counting
- More emphasis on the 3 important methods for dealing with large computations: BigInteger, prime power, or modulo arithmetic
- More discussion on Floyd's cycle finding algorithm
- NEW in 2011: Game Theory
- NEW in 2011: Powers of a (Square) Matrix, can be applied to DP too

- Basic string processing skills (new section)
- Much more string problems + categorization
- String matching: KMP, matching on 2D grid
- Enhanced explanation of Suffix Trie, Tree, and Array

- Expanded libraries, especially on points, lines and polygons
- NEW in 2011: inPolygon, cutPolygon routines
- Clearer explanation of Graham's scan convex hull algorithm

- Problem Decomposition: 2 components, 3 components...
- More advanced search techniques: A*, Depth Limited Search, Iterative Deepening Search, Iterative Deepening A*
- More advanced DP: bitmask technique, compilation of common DP states, better state representation, etc

- Steven's Methods to Solve is now integrated in the second edition
- 1198 UVa problems are listed, 600 more than the 1st edition. Getting more than 1000 problems AC is no longer a wild dream