**Total Chapters**:

9

**Number of Pages**:

447+4 (cover)

**Release Date**:

24 May 2013

**Selling price (Printed)**

A5 Paperback: 19.99 USD (+Shipping Cost), Buy A5 Paperback

8.25 x 10.75 inch (~2xA5) Hard Cover: 29.99 USD (+Shipping Cost), Buy Hard Cover

CP3 hard copy version will be phased out very soon (in 2021)

**Selling price (eBook)**

If you cannot get CP4 (hard copy) yet, use the softcopy of the old CP3 as a stopgap measure Buy CP3 e-book

**Book Sales Status at lulu.com**

Average daily sales: 9028/2555 (2013-2019) ~= 3.53 book(s)/day.

- A gentler intro: Anatomy of programming contest problem; Parsing Input/Formatting Output for beginners; Common errors; Common shortcut tricks

- NEW in 2013: Deque
- NEW in 2013: Many written exercises about basic data structures from Steven's other course in SoC, NUS
- Union Find Data Structure now uses 'union by rank' by default
- UFDS, Segment Tree, and BIT are now written in OOP fashion

- NEW in 2013: iterative solution for subset and permutation problems
- Updated discussion nested loops and recursive backtracking (8 queens problem)
- NEW in 2013: discussion of one important trick for dealing with greedy problems: sorting
- Updated discussion of top-down and bottom-up DP
- NEW in 2013: Alternative way to code top-down DP and to print out top-down DP solution, inclusion of Kadane's algorithm for static 1D/2D range sum query
- Much more programming exercises with a better categorization system

- Graph traversal and MST sections are revisited and rewritten to make the discussed algorithms clearer
- NEW in 2013: Example of (medium level) graph modeling for shortest path problem, network flow problem, and bipartite matching problem
- Discussion of Dinic's max flow algorithm (placed in Chapter 9), Hopcroft Karp's bipartite matching algorithm (also placed in Chapter 9), and important technique to improve the runtime of the Augmenting Path Bipartite Matching algorithm
- Much more programming exercises

- Strengthening the explanation of various sections
- NEW in 2013: Techniques of using Java BigInteger, more collection of classic combinatorics problems
- Improved discussion of Matrix Power (now placed in Chapter 9)
- Insights on the faster Brent's cycle-finding algorithm and the Pollard's rho integer factoring algorithm (as exercise and in Chapter 9)

- NEW in 2013: New technique of using Java String class
- More collection of Ad Hoc string problems
- Further strengthening of Suffix Trie/Tree/Array explanation; the terminating symbol is restored

- NEW in 2013: Several new geometric library routines are added
- Existing library routines are enhanced

- Reorder the sections so that the more advanced search and DP techniques are listed before problem decomposition (as it may involve those advanced search/DP techniques)
- NEW in 2013: Backtracking with Bitmask, State Space Search, Meet in the Middle

- Collection of (many, 34 of them) rare algorithms, data structures, and/or programming problems that have not been listed in the first eight chapters

- Discussion of ~1700 UVa + other OJ problems
- Some UVa problems are re-classified into sa better category :)