Welcome to the Competitive Programming domain! This comprehensive roadmap will guide you from beginner to advanced competitive programming, covering essential algorithms, data structures, and problem-solving techniques.
-
Choose a Language
- C++ (Most Popular)
- Java
- Python
-
Basic Concepts
- Variables and Data Types
- Operators
- Conditional Statements (if-else, switch)
- Loops (for, while, do-while)
- Functions and Recursion
- Arrays and Strings
- Basic Input/Output
-
Practice Platforms
- Arrays and 2D Arrays
- Strings and String Manipulation
- Linked Lists
- Stacks
- Queues
- Hash Tables/Maps
- Sets
- Linear Search
- Binary Search
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Basic Recursion Problems
Practice: Solve 50-100 easy problems
- Trees (Binary Trees, BST)
- Heaps (Min Heap, Max Heap)
- Priority Queues
- Segment Trees
- Binary Indexed Trees (Fenwick Tree)
- Disjoint Set Union (DSU)
- Trie
- Graph Representation (Adjacency List, Matrix)
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Shortest Path Algorithms
- Dijkstra's Algorithm
- Bellman-Ford
- Floyd-Warshall
- Minimum Spanning Tree
- Kruskal's Algorithm
- Prim's Algorithm
- Topological Sort
- Strongly Connected Components
- Introduction to DP
- Memoization vs Tabulation
- Classic DP Problems
- Fibonacci
- Longest Common Subsequence (LCS)
- Longest Increasing Subsequence (LIS)
- Knapsack Problem (0/1, Unbounded)
- Edit Distance
- Coin Change
- Matrix Chain Multiplication
- Activity Selection
- Huffman Coding
- Fractional Knapsack
- Job Sequencing
- Minimum Platforms
Practice: Solve 200-300 medium problems
- DP on Trees
- DP on Graphs
- Digit DP
- Bitmask DP
- DP Optimization Techniques
- Convex Hull Trick
- Divide and Conquer DP
- Network Flow
- Ford-Fulkerson
- Dinic's Algorithm
- Bipartite Matching
- Lowest Common Ancestor (LCA)
- Heavy-Light Decomposition
- Centroid Decomposition
- KMP Algorithm
- Rabin-Karp
- Z-Algorithm
- Suffix Array
- Suffix Tree
- Aho-Corasick
- Number Theory
- Prime Numbers (Sieve of Eratosthenes)
- GCD and LCM
- Modular Arithmetic
- Fermat's Theorem
- Chinese Remainder Theorem
- Computational Geometry
- Convex Hull
- Line Intersection
- Sweep Line Algorithm
- Game Theory
- Nim Game
- Sprague-Grundy Theorem
Practice: Solve 300-500 hard problems
- Square Root Decomposition
- Mo's Algorithm
- Persistent Data Structures
- Link-Cut Trees
- Suffix Automaton
- Fast Fourier Transform (FFT)
- Matrix Exponentiation
- Advanced Number Theory
- Combinatorics
- Time Management
- Problem Selection
- Debugging Techniques
- Code Templates
- Test Case Generation
Practice: Participate in regular contests
- Codeforces - 2-3 contests per week
- CodeChef - Monthly contests
- AtCoder - Weekly contests
- LeetCode - Weekly & Biweekly contests
- Google Kick Start
- Facebook Hacker Cup
- "Competitive Programming 3" by Steven & Felix Halim
- "Introduction to Algorithms" (CLRS)
- "The Algorithm Design Manual" by Steven Skiena
- "Programming Challenges" by Skiena & Revilla
- "Guide to Competitive Programming" by Antti Laaksonen
- Algorithms Specialization - Stanford (Coursera)
- MIT OCW - Introduction to Algorithms
- Competitive Programming on YouTube
- Solve Daily: Consistency is key - solve at least 1-2 problems daily
- Upsolve: After contests, solve problems you couldn't solve during contest
- Learn from Others: Read editorials and others' solutions
- Practice Weaknesses: Focus on topics you struggle with
- Time Yourself: Practice under time pressure
- Read All Problems: Quickly scan all problems first
- Start with Easy: Solve easier problems first to build confidence
- Write Clean Code: Use proper formatting and comments
- Test Edge Cases: Always test boundary conditions
- Don't Give Up: Even if you can't solve all, partial credit counts
- Use Templates: Maintain a code template for faster coding
- Short Variable Names: Use short, meaningful names (i, j, n, m)
- Macros: Use macros for frequently used code
- Fast I/O: Use fast input/output methods
| Rating Range | Level | Focus Areas |
|---|---|---|
| 0 - 1199 | Newbie | Basics, Arrays, Loops, Simple Math |
| 1200 - 1399 | Pupil | Binary Search, Greedy, Simple DP |
| 1400 - 1599 | Specialist | DP, Graphs, Number Theory |
| 1600 - 1899 | Expert | Advanced DP, Advanced Graphs |
| 1900 - 2099 | Candidate Master | All Advanced Topics |
| 2100 - 2299 | Master | Problem Solving Speed |
| 2300+ | International Master+ | Innovation & Creativity |
- Solve minimum 10 problems
- Participate in 2-3 contests
- Learn 1 new algorithm/concept
- Review and upsolve contest problems
- Solve 50+ problems
- Increase rating by 50-100 points
- Master 2-3 algorithms thoroughly
- Contribute solutions to this repository
- Pick a topic (e.g., DP)
- Read theory and understand
- Solve 20-30 problems on that topic
- Move to next topic
- Revisit periodically
- Virtual contests on old contests
- Participate in live contests regularly
- Analyze mistakes after each contest
- Upsolve at least 2 problems per contest
- Solve 50% of Div 2 A problems
- Rating: 1200+
- Solve 100+ easy problems
- Solve 50% of Div 2 B problems
- Rating: 1400-1600
- Solve 300+ problems total
- Solve Div 2 C problems regularly
- Rating: 1800+
- Solve 500+ problems total
- Solve Div 1 problems
- Rating: 2100+
- 1000+ problems solved
"The only way to learn a new programming language is by writing programs in it." - Dennis Ritchie
"Programs must be written for people to read, and only incidentally for machines to execute." - Harold Abelson
- Everyone starts somewhere - Even top programmers were beginners once
- Consistency beats intensity - Regular practice is better than sporadic marathons
- Learn from failures - Each wrong answer teaches you something
- Enjoy the journey - Problem-solving should be fun!
Share your competitive programming solutions:
- Create a new problem solution folder
- Include problem statement, approach, and code
- Add time/space complexity analysis
- Submit PR following contribution guidelines
- Join competitive programming communities
- Participate in discussions
- Share your solutions and learn from others
- Help fellow programmers
Ready to start your competitive programming journey? Let's code! 💻🚀