Welcome to the Competitive Programming Handbook Repository — a comprehensive, structured, and community-driven collection of algorithms, data structures, problem-solving techniques, and detailed explanations aimed at helping students and developers master competitive programming.
This repository is designed to serve as a single-source reference for beginners as well as advanced programmers preparing for:
- Competitive Coding Contests
- Technical Placement Interviews
- Olympiads
- GATE
- ICPC
- Codeforces
- LeetCode
- AtCoder
The goal of this project is to:
- Build a complete handbook of competitive programming
- Provide clear explanations with clean implementations
- Cover all major algorithms and data structures
- Include common CP patterns and optimization tricks
- Encourage open-source collaboration
- Maintain professional documentation and structure
This repository is meant to grow continuously with contributions from the community.
This directory will contain:
- All algorithms
- Core data structures
- Classical problem solutions
- Optimized solutions
- Step-by-step explanations
Each algorithm must be placed in its relevant category folder, such as:
dpgraphstreesmathstringsbit-manipulationgreedysearchingrange-queries
More directories will be added as the project scales.
- Basic to Advanced Algorithms
- Fundamental & Advanced Data Structures
- Dynamic Programming
- Graph Theory (BFS, DFS, Dijkstra, MST, etc.)
- Number Theory
- Greedy Techniques
- Bit Manipulation
- Binary Search
- String Algorithms (KMP, Z, Trie, Hashing)
- Geometry
- Range Queries (Segment Tree, Fenwick Tree)
- Advanced Topics (HLD, Mo’s Algorithm, etc.)
Each topic will include:
- Algorithm explanation
- Time & Space Complexity
- Clean, readable implementation
- Sample test cases
- Optimization notes
Contributions are open to everyone.
- Fork this repository
- Create a new branch with your name
git checkout -b your-name
- Add your files inside the
/algosdirectory in the appropriate category - Follow clean coding practices with proper documentation
- Commit and push your changes
- Create a Pull Request (PR)
All pull requests will be reviewed before merging.
- Code must be well-documented
- Follow standard naming conventions
- Include time & space complexity
- Avoid unnecessary boilerplate
- One algorithm per file
- No copied code without proper credit
- Clearly explain tricky logic
Low-effort or poorly documented submissions will not be merged.
This project is built on:
-
Collaboration
-
Learning
-
Teaching
-
Knowledge Sharing
-
If you’re a beginner, this repository will guide you.
-
If you’re experienced, your contributions can help thousands.
- Full Algorithm Roadmap
- Problem-wise CP Handbook
- Interview Preparation Track
- GATE-Level Problem Sets
- Contest-wise Practice Banks
- PDF Version of the Handbook
- Language-wise Implementations (C++, Java, Python, Rust)
If this repository helps you:
- Give it a ⭐ on GitHub
- Share it with your friends
- Contribute regularly
Your support helps the project grow.
For:
- Bug reports
- Suggestions
- Feature requests
- New topic proposals
Please open an Issue or submit a Pull Request.