A comprehensive collection of algorithms and data structures for competitive programming, maintained by Universidad Técnica Federico Santa María (USM) students.
- Typst - A modern markup-based typesetting system
typst compile main.typThis generates a PDF handbook with all algorithms organized by category.
The handbook includes implementations for:
- 🔧 General - Templates and troubleshooting guides
- 🔤 Strings - String processing algorithms (KMP, Z-algorithm, Suffix Array, Trie, etc.)
- ⚡ Algorithms - General algorithms (Mo's algorithm, Tortoise-Hare cycle detection)
- 📊 Data Structures - Advanced data structures (Segment Trees, Fenwick Trees, Treaps, etc.)
- 🧮 Mathematics - Number theory, linear algebra, and polynomial operations
- 📈 Graphs - Graph algorithms (DFS, BFS, Shortest paths, Network flows, etc.)
- 📐 Geometry - Computational geometry (Convex Hull, Point operations, etc.)
- 🎯 Dynamic Programming - DP optimizations and classic problems
- 🔀 Combinatorics - Advanced combinatorial algorithms
- Naming: Use lowercase with hyphens for folders and files (
knuth-morris-pratt→kmp) - File Extensions: Only
.cppand.typfiles allowed - Indentation: Use exactly 2 spaces (no tabs)
- Length: Keep filenames under 18 characters when possible
- Atomicity: Each file should contain only one algorithm/data structure
- Documentation: Every C++ file must start with a multi-line comment describing the algorithm
- No Macros: Avoid competitive programming macros like
rep,repx, etc. - Clean Code: Write readable, well-structured code
content/
├── algorithms/ # General algorithms
├── combinatorial/ # Combinatorial algorithms
├── data-structures/ # Advanced data structures
├── dynamic-programming/ # DP techniques
├── general/ # Templates and utilities
├── geometry/ # Computational geometry
├── graphs/ # Graph algorithms
├── maths/ # Mathematical algorithms
└── strings/ # String algorithms
- Concise Implementations - Provide short, efficient algorithm implementations
- Educational Value - Include clear descriptions and explanations
- Competitive Ready - Code optimized for programming contests
- Comprehensive Coverage - Cover all essential competitive programming topics
- Additional dynamic programming techniques
- Voronoi diagrams and Delaunay triangulation
- Extended geometry primitives (lines, circles, 3D operations)
- 3D Convex Hull algorithms
- Karatsuba polynomial multiplication
- Advanced polynomial operations
Maintainers:
- Gabriel Carmona (MrYhatoh)
- Carlos Lagos (CharlesLakes)
- Sebastián Torrealba (storrealbac)
- Abner Vidal (abner_vidal)
Contributors:
- Javier Oliva (JOliva)
- Marcelo Lemus (MarceloL)
This project is licensed under the terms specified in the LICENSE file.
Built with ❤️ for the competitive programming community at USM