\BOOKMARK [0][-]{chapter*.2}{Preface}{}% 1 \BOOKMARK [-1][-]{part.1}{I Basic techniques}{}% 2 \BOOKMARK [0][-]{chapter.1}{Introduction}{part.1}% 3 \BOOKMARK [1][-]{section.1.1}{Programming languages}{chapter.1}% 4 \BOOKMARK [1][-]{section.1.2}{Input and output}{chapter.1}% 5 \BOOKMARK [1][-]{section.1.3}{Working with numbers}{chapter.1}% 6 \BOOKMARK [1][-]{section.1.4}{Shortening code}{chapter.1}% 7 \BOOKMARK [1][-]{section.1.5}{Mathematics}{chapter.1}% 8 \BOOKMARK [1][-]{section.1.6}{Contests and resources}{chapter.1}% 9 \BOOKMARK [0][-]{chapter.2}{Time complexity}{part.1}% 10 \BOOKMARK [1][-]{section.2.1}{Calculation rules}{chapter.2}% 11 \BOOKMARK [1][-]{section.2.2}{Complexity classes}{chapter.2}% 12 \BOOKMARK [1][-]{section.2.3}{Estimating efficiency}{chapter.2}% 13 \BOOKMARK [1][-]{section.2.4}{Maximum subarray sum}{chapter.2}% 14 \BOOKMARK [0][-]{chapter.3}{Sorting}{part.1}% 15 \BOOKMARK [1][-]{section.3.1}{Sorting theory}{chapter.3}% 16 \BOOKMARK [1][-]{section.3.2}{Sorting in C++}{chapter.3}% 17 \BOOKMARK [1][-]{section.3.3}{Binary search}{chapter.3}% 18 \BOOKMARK [0][-]{chapter.4}{Data structures}{part.1}% 19 \BOOKMARK [1][-]{section.4.1}{Dynamic arrays}{chapter.4}% 20 \BOOKMARK [1][-]{section.4.2}{Set structures}{chapter.4}% 21 \BOOKMARK [1][-]{section.4.3}{Map structures}{chapter.4}% 22 \BOOKMARK [1][-]{section.4.4}{Iterators and ranges}{chapter.4}% 23 \BOOKMARK [1][-]{section.4.5}{Other structures}{chapter.4}% 24 \BOOKMARK [1][-]{section.4.6}{Comparison to sorting}{chapter.4}% 25 \BOOKMARK [0][-]{chapter.5}{Complete search}{part.1}% 26 \BOOKMARK [1][-]{section.5.1}{Generating subsets}{chapter.5}% 27 \BOOKMARK [1][-]{section.5.2}{Generating permutations}{chapter.5}% 28 \BOOKMARK [1][-]{section.5.3}{Backtracking}{chapter.5}% 29 \BOOKMARK [1][-]{section.5.4}{Pruning the search}{chapter.5}% 30 \BOOKMARK [1][-]{section.5.5}{Meet in the middle}{chapter.5}% 31 \BOOKMARK [0][-]{chapter.6}{Greedy algorithms}{part.1}% 32 \BOOKMARK [1][-]{section.6.1}{Coin problem}{chapter.6}% 33 \BOOKMARK [1][-]{section.6.2}{Scheduling}{chapter.6}% 34 \BOOKMARK [1][-]{section.6.3}{Tasks and deadlines}{chapter.6}% 35 \BOOKMARK [1][-]{section.6.4}{Minimizing sums}{chapter.6}% 36 \BOOKMARK [1][-]{section.6.5}{Data compression}{chapter.6}% 37 \BOOKMARK [0][-]{chapter.7}{Dynamic programming}{part.1}% 38 \BOOKMARK [1][-]{section.7.1}{Coin problem}{chapter.7}% 39 \BOOKMARK [1][-]{section.7.2}{Longest increasing subsequence}{chapter.7}% 40 \BOOKMARK [1][-]{section.7.3}{Paths in a grid}{chapter.7}% 41 \BOOKMARK [1][-]{section.7.4}{Knapsack problems}{chapter.7}% 42 \BOOKMARK [1][-]{section.7.5}{Edit distance}{chapter.7}% 43 \BOOKMARK [1][-]{section.7.6}{Counting tilings}{chapter.7}% 44 \BOOKMARK [0][-]{chapter.8}{Amortized analysis}{part.1}% 45 \BOOKMARK [1][-]{section.8.1}{Two pointers method}{chapter.8}% 46 \BOOKMARK [1][-]{section.8.2}{Nearest smaller elements}{chapter.8}% 47 \BOOKMARK [1][-]{section.8.3}{Sliding window minimum}{chapter.8}% 48 \BOOKMARK [0][-]{chapter.9}{Range queries}{part.1}% 49 \BOOKMARK [1][-]{section.9.1}{Static array queries}{chapter.9}% 50 \BOOKMARK [1][-]{section.9.2}{Binary indexed tree}{chapter.9}% 51 \BOOKMARK [1][-]{section.9.3}{Segment tree}{chapter.9}% 52 \BOOKMARK [1][-]{section.9.4}{Additional techniques}{chapter.9}% 53 \BOOKMARK [0][-]{chapter.10}{Bit manipulation}{part.1}% 54 \BOOKMARK [1][-]{section.10.1}{Bit representation}{chapter.10}% 55 \BOOKMARK [1][-]{section.10.2}{Bit operations}{chapter.10}% 56 \BOOKMARK [1][-]{section.10.3}{Representing sets}{chapter.10}% 57 \BOOKMARK [1][-]{section.10.4}{Bit optimizations}{chapter.10}% 58 \BOOKMARK [1][-]{section.10.5}{Dynamic programming}{chapter.10}% 59 \BOOKMARK [-1][-]{part.2}{II Graph algorithms}{}% 60 \BOOKMARK [0][-]{chapter.11}{Basics of graphs}{part.2}% 61 \BOOKMARK [1][-]{section.11.1}{Graph terminology}{chapter.11}% 62 \BOOKMARK [1][-]{section.11.2}{Graph representation}{chapter.11}% 63 \BOOKMARK [0][-]{chapter.12}{Graph traversal}{part.2}% 64 \BOOKMARK [1][-]{section.12.1}{Depth-first search}{chapter.12}% 65 \BOOKMARK [1][-]{section.12.2}{Breadth-first search}{chapter.12}% 66 \BOOKMARK [1][-]{section.12.3}{Applications}{chapter.12}% 67 \BOOKMARK [0][-]{chapter.13}{Shortest paths}{part.2}% 68 \BOOKMARK [1][-]{section.13.1}{Bellman\205Ford algorithm}{chapter.13}% 69 \BOOKMARK [1][-]{section.13.2}{Dijkstra's algorithm}{chapter.13}% 70 \BOOKMARK [1][-]{section.13.3}{Floyd\205Warshall algorithm}{chapter.13}% 71 \BOOKMARK [0][-]{chapter.14}{Tree algorithms}{part.2}% 72 \BOOKMARK [1][-]{section.14.1}{Tree traversal}{chapter.14}% 73 \BOOKMARK [1][-]{section.14.2}{Diameter}{chapter.14}% 74 \BOOKMARK [1][-]{section.14.3}{All longest paths}{chapter.14}% 75 \BOOKMARK [1][-]{section.14.4}{Binary trees}{chapter.14}% 76 \BOOKMARK [0][-]{chapter.15}{Spanning trees}{part.2}% 77 \BOOKMARK [1][-]{section.15.1}{Kruskal's algorithm}{chapter.15}% 78 \BOOKMARK [1][-]{section.15.2}{Union-find structure}{chapter.15}% 79 \BOOKMARK [1][-]{section.15.3}{Prim's algorithm}{chapter.15}% 80 \BOOKMARK [0][-]{chapter.16}{Directed graphs}{part.2}% 81 \BOOKMARK [1][-]{section.16.1}{Topological sorting}{chapter.16}% 82 \BOOKMARK [1][-]{section.16.2}{Dynamic programming}{chapter.16}% 83 \BOOKMARK [1][-]{section.16.3}{Successor paths}{chapter.16}% 84 \BOOKMARK [1][-]{section.16.4}{Cycle detection}{chapter.16}% 85 \BOOKMARK [0][-]{chapter.17}{Strong connectivity}{part.2}% 86 \BOOKMARK [1][-]{section.17.1}{Kosaraju's algorithm}{chapter.17}% 87 \BOOKMARK [1][-]{section.17.2}{2SAT problem}{chapter.17}% 88 \BOOKMARK [0][-]{chapter.18}{Tree queries}{part.2}% 89 \BOOKMARK [1][-]{section.18.1}{Finding ancestors}{chapter.18}% 90 \BOOKMARK [1][-]{section.18.2}{Subtrees and paths}{chapter.18}% 91 \BOOKMARK [1][-]{section.18.3}{Lowest common ancestor}{chapter.18}% 92 \BOOKMARK [1][-]{section.18.4}{Offline algorithms}{chapter.18}% 93 \BOOKMARK [0][-]{chapter.19}{Paths and circuits}{part.2}% 94 \BOOKMARK [1][-]{section.19.1}{Eulerian paths}{chapter.19}% 95 \BOOKMARK [1][-]{section.19.2}{Hamiltonian paths}{chapter.19}% 96 \BOOKMARK [1][-]{section.19.3}{De Bruijn sequences}{chapter.19}% 97 \BOOKMARK [1][-]{section.19.4}{Knight's tours}{chapter.19}% 98 \BOOKMARK [0][-]{chapter.20}{Flows and cuts}{part.2}% 99 \BOOKMARK [1][-]{section.20.1}{Ford\205Fulkerson algorithm}{chapter.20}% 100 \BOOKMARK [1][-]{section.20.2}{Disjoint paths}{chapter.20}% 101 \BOOKMARK [1][-]{section.20.3}{Maximum matchings}{chapter.20}% 102 \BOOKMARK [1][-]{section.20.4}{Path covers}{chapter.20}% 103 \BOOKMARK [-1][-]{part.3}{III Advanced topics}{}% 104 \BOOKMARK [0][-]{chapter.21}{Number theory}{part.3}% 105 \BOOKMARK [1][-]{section.21.1}{Primes and factors}{chapter.21}% 106 \BOOKMARK [1][-]{section.21.2}{Modular arithmetic}{chapter.21}% 107 \BOOKMARK [1][-]{section.21.3}{Solving equations}{chapter.21}% 108 \BOOKMARK [1][-]{section.21.4}{Other results}{chapter.21}% 109 \BOOKMARK [0][-]{chapter.22}{Combinatorics}{part.3}% 110 \BOOKMARK [1][-]{section.22.1}{Binomial coefficients}{chapter.22}% 111 \BOOKMARK [1][-]{section.22.2}{Catalan numbers}{chapter.22}% 112 \BOOKMARK [1][-]{section.22.3}{Inclusion-exclusion}{chapter.22}% 113 \BOOKMARK [1][-]{section.22.4}{Burnside's lemma}{chapter.22}% 114 \BOOKMARK [1][-]{section.22.5}{Cayley's formula}{chapter.22}% 115 \BOOKMARK [0][-]{chapter.23}{Matrices}{part.3}% 116 \BOOKMARK [1][-]{section.23.1}{Operations}{chapter.23}% 117 \BOOKMARK [1][-]{section.23.2}{Linear recurrences}{chapter.23}% 118 \BOOKMARK [1][-]{section.23.3}{Graphs and matrices}{chapter.23}% 119 \BOOKMARK [0][-]{chapter.24}{Probability}{part.3}% 120 \BOOKMARK [1][-]{section.24.1}{Calculation}{chapter.24}% 121 \BOOKMARK [1][-]{section.24.2}{Events}{chapter.24}% 122 \BOOKMARK [1][-]{section.24.3}{Random variables}{chapter.24}% 123 \BOOKMARK [1][-]{section.24.4}{Markov chains}{chapter.24}% 124 \BOOKMARK [1][-]{section.24.5}{Randomized algorithms}{chapter.24}% 125 \BOOKMARK [0][-]{chapter.25}{Game theory}{part.3}% 126 \BOOKMARK [1][-]{section.25.1}{Game states}{chapter.25}% 127 \BOOKMARK [1][-]{section.25.2}{Nim game}{chapter.25}% 128 \BOOKMARK [1][-]{section.25.3}{Sprague\205Grundy theorem}{chapter.25}% 129 \BOOKMARK [0][-]{chapter.26}{String algorithms}{part.3}% 130 \BOOKMARK [1][-]{section.26.1}{String terminology}{chapter.26}% 131 \BOOKMARK [1][-]{section.26.2}{Trie structure}{chapter.26}% 132 \BOOKMARK [1][-]{section.26.3}{String hashing}{chapter.26}% 133 \BOOKMARK [1][-]{section.26.4}{Z-algorithm}{chapter.26}% 134 \BOOKMARK [0][-]{chapter.27}{Square root algorithms}{part.3}% 135 \BOOKMARK [1][-]{section.27.1}{Combining algorithms}{chapter.27}% 136 \BOOKMARK [1][-]{section.27.2}{Integer partitions}{chapter.27}% 137 \BOOKMARK [1][-]{section.27.3}{Mo's algorithm}{chapter.27}% 138 \BOOKMARK [0][-]{chapter.28}{Segment trees revisited}{part.3}% 139 \BOOKMARK [1][-]{section.28.1}{Lazy propagation}{chapter.28}% 140 \BOOKMARK [1][-]{section.28.2}{Dynamic trees}{chapter.28}% 141 \BOOKMARK [1][-]{section.28.3}{Data structures}{chapter.28}% 142 \BOOKMARK [1][-]{section.28.4}{Two-dimensionality}{chapter.28}% 143 \BOOKMARK [0][-]{chapter.29}{Geometry}{part.3}% 144 \BOOKMARK [1][-]{section.29.1}{Complex numbers}{chapter.29}% 145 \BOOKMARK [1][-]{section.29.2}{Points and lines}{chapter.29}% 146 \BOOKMARK [1][-]{section.29.3}{Polygon area}{chapter.29}% 147 \BOOKMARK [1][-]{section.29.4}{Distance functions}{chapter.29}% 148 \BOOKMARK [0][-]{chapter.30}{Sweep line algorithms}{part.3}% 149 \BOOKMARK [1][-]{section.30.1}{Intersection points}{chapter.30}% 150 \BOOKMARK [1][-]{section.30.2}{Closest pair problem}{chapter.30}% 151 \BOOKMARK [1][-]{section.30.3}{Convex hull problem}{chapter.30}% 152 \BOOKMARK [0][-]{section*.3}{Bibliography}{part.3}% 153 \BOOKMARK [0][-]{chapter*.5}{Index}{part.3}% 154