- Nutella (Hakim Sabzevari - icpc 2023): pdf, docx
- Kolompeh (Sharif University of Technology): pdf, repo
- MIT notebook: pdf
- Stanford University notebook: pdf, repo
- kactl university notebook: pdf, repo
- Beheshti University notebook: pdf, repo
🎈 more detail
- Data Structures:
- Segment Trees (including lazy propagation)
- Fenwick Tree (BIT)
- Union-Find / Disjoint Set (with path compression and union by rank)
- Trie (for strings and numbers)
- Deque (for sliding window problems)
- Graph Algorithms:
- BFS / DFS (including for connected components)
- Dijkstra’s and Bellman-Ford (shortest paths)
- Floyd-Warshall (all-pairs shortest path)
- Topological Sorting
- Minimum Spanning Tree (Kruskal’s and Prim’s)
- Max Flow (Ford-Fulkerson or Edmonds-Karp)
- Dynamic Programming (DP):
- Basic templates (Knapsack, LIS, LCS)
- Matrix exponentiation
- Bitmask DP
- Math & Number Theory:
- Modular arithmetic functions (GCD, LCM, mod inverse)
- Sieve of Eratosthenes
- Prime factorization
- Fast exponentiation
- Combinatorics functions (factorial, nCr, Catalan numbers)
- String Algorithms:
- KMP and Z-algorithm (pattern matching)
- Rabin-Karp (rolling hash)
- Suffix array and LCP array
- Trie operations
- Geometry:
- Convex hull (Graham's scan)
- Line intersection
- Rotating calipers
- Sorting and Searching:
- Custom comparator templates
- Binary search
- Merge sort, Quick sort
- Miscellaneous:
- Fast I/O templates
- Randomized algorithms (for problems like randomized quicksort)
- Bit manipulation tricks
- Cartesian Tree (for range query optimization)