Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

BEGINNER β†’ EXPERT

CP Roadmap

Competitive Programming Β· 11 Levels Β· Track Your Progress

βšͺ Core topic Β Β Β·Β Β  🟒 Addvance Β Β Β·Β Β  πŸ”΄ Low CP priority


Topics Levels Progress


Level 1 Language & STL Foundations Β 0/29

🎯 Goal: Be comfortable writing small programs without overthinking

C++ Basics

  • βšͺ Variable declarations
  • βšͺ Data types
  • βšͺ Control flow (if-else, switch)
  • βšͺ Loops (for, while)
  • βšͺ Functions
  • βšͺ Input / Output (cin, cout)
  • βšͺ Header files
  • βšͺ Namespace management
  • 🟒 References & pointers
  • 🟒 Pass by value vs reference
  • 🟒 Struct & class basics
  • 🟒 Lambda functions
  • πŸ”΄ OOP / Inheritance
  • πŸ”΄ Advanced templates

STL Basics

  • βšͺ Vector
  • βšͺ Queue
  • βšͺ Stack
  • βšͺ Deque
  • βšͺ Priority queue
  • βšͺ Set / Multiset
  • βšͺ Map / Multimap
  • βšͺ Iterators
  • βšͺ sort, find, count algorithms
  • 🟒 unordered_map / unordered_set
  • 🟒 pair & tuple
  • 🟒 lower_bound / upper_bound
  • 🟒 next_permutation
  • 🟒 accumulate / partial_sum
  • πŸ”΄ list β€” STL linked list
Level 2 Complexity & I/O Β 0/17

🎯 Goal: Understand exactly how fast your code runs

Complexity Theory

  • βšͺ Big O notation
  • βšͺ Time complexity estimation
  • βšͺ Space complexity
  • βšͺ Amortized analysis
  • βšͺ Constant factor optimization
  • 🟒 Recognizing O from loop structure
  • 🟒 Recursion tree analysis
  • πŸ”΄ Omega notation
  • πŸ”΄ Theta notation

Practical Limits

  • βšͺ Reading input constraints
  • βšͺ Memory limitations
  • βšͺ Stack overflow prevention
  • βšͺ Fast I/O (ios_base::sync)
  • 🟒 printf / scanf vs cin speed
  • 🟒 Reading until EOF
  • 🟒 10^8 ops/sec rule of thumb
  • 🟒 Integer overflow β€” use long long
Level 3 Basic Data Structures Β 0/18

🎯 Goal: Understand how data is stored and accessed efficiently

Linear Structures

  • βšͺ Static arrays
  • βšͺ Dynamic arrays
  • βšͺ String manipulation
  • βšͺ Bit manipulation
  • 🟒 Prefix sums
  • 🟒 Difference arrays
  • 🟒 Sparse table
  • πŸ”΄ Linked lists
  • πŸ”΄ Circular buffers

Hashing

  • βšͺ Hash functions
  • βšͺ Hash tables
  • βšͺ Collision resolution
  • βšͺ Rolling hash
  • βšͺ Custom hash
  • 🟒 Polynomial hashing
  • 🟒 Anti-hack hash (random seed)
  • πŸ”΄ Open addressing (theory)
  • πŸ”΄ Chaining vs open addressing theory
Level 4 Sorting & Searching Β 0/18

🎯 Goal: Master searching & sorting β€” a CORE CP skill

Sorting Algorithms

  • βšͺ Merge sort
  • βšͺ Quick sort
  • βšͺ Heap sort
  • βšͺ Counting sort
  • 🟒 Radix sort
  • 🟒 Custom comparators
  • 🟒 Inversion count via merge sort
  • πŸ”΄ Bubble sort
  • πŸ”΄ Insertion sort

Searching Techniques

  • βšͺ Binary search
  • βšͺ Binary search on answer
  • βšͺ Ternary search
  • βšͺ Two pointers
  • βšͺ Meet in the middle
  • 🟒 Sliding window
  • 🟒 Fractional binary search
  • 🟒 Parallel binary search
  • πŸ”΄ Linear search
Level 5 Number Theory & Math Β 0/20

🎯 Goal: Solve math-heavy competitive programming problems

Basics

  • βšͺ Prime factorization
  • βšͺ Sieve of Eratosthenes
  • βšͺ GCD
  • βšͺ LCM
  • βšͺ Modular arithmetic
  • βšͺ Fermat's Little Theorem
  • 🟒 Linear sieve
  • 🟒 Fast exponentiation (binary exp)
  • 🟒 nCr mod p β€” combinatorics
  • 🟒 Pascal's triangle

Advanced

  • βšͺ Modular inverse
  • βšͺ Euler Totient Function
  • βšͺ Extended Euclidean Algorithm
  • βšͺ Chinese Remainder Theorem
  • βšͺ Primality testing
  • 🟒 Miller-Rabin primality test
  • 🟒 Inclusion-exclusion principle
  • 🟒 Game theory β€” Sprague-Grundy
  • πŸ”΄ Discrete logarithm
  • πŸ”΄ Pollard's rho factorization
Level 6 Dynamic Programming Β 0/20

🎯 Goal: Learn to break hard problems into states

Foundations

  • βšͺ Overlapping subproblems
  • βšͺ Optimal substructure
  • βšͺ Memoization
  • βšͺ Tabulation
  • βšͺ State definition
  • βšͺ Base cases
  • 🟒 DP on intervals
  • 🟒 DP with monotone queue
  • 🟒 Divide & conquer DP optimization
  • 🟒 Convex Hull Trick (CHT)

Advanced DP

  • βšͺ Digit DP
  • βšͺ Bitmask DP
  • βšͺ Tree DP
  • βšͺ Knapsack variants
  • βšͺ LCS
  • βšͺ Matrix exponentiation
  • 🟒 LIS β€” O(n log n)
  • 🟒 SOS DP β€” Sum over subsets
  • 🟒 Profile DP
  • 🟒 DP on DAGs
Level 7 Graph Theory Β 0/35

🎯 Goal: Master graph-based problems at every difficulty

Graph Basics

  • βšͺ Adjacency matrix
  • βšͺ Adjacency list
  • βšͺ Edge list
  • βšͺ DFS
  • βšͺ BFS
  • 🟒 Flood fill
  • 🟒 Cycle detection
  • 🟒 Bipartite check
  • 🟒 0-1 BFS
  • 🟒 Multi-source BFS

Shortest Path & MST

  • βšͺ Dijkstra
  • βšͺ Bellman-Ford
  • βšͺ Floyd-Warshall
  • βšͺ Prim's algorithm
  • βšͺ Kruskal's algorithm
  • 🟒 SPFA (queue Bellman-Ford)
  • πŸ”΄ Johnson's algorithm

Advanced Graph

  • βšͺ Topological sort
  • βšͺ Strongly connected components (Tarjan/Kosaraju)
  • βšͺ Articulation points
  • βšͺ Bridges
  • βšͺ LCA
  • βšͺ Heavy-light decomposition
  • 🟒 Euler path / circuit
  • 🟒 2-SAT
  • 🟒 Functional graph
  • 🟒 Virtual tree

Flow & Matching

  • βšͺ Max Flow / Min Cut
  • βšͺ Dinic's algorithm
  • βšͺ Bipartite matching
  • βšͺ Hopcroft-Karp
  • 🟒 Min-cost max flow
  • 🟒 Hungarian algorithm
  • πŸ”΄ Ford-Fulkerson β€” use Dinic's instead
  • πŸ”΄ Edmonds-Karp β€” use Dinic's instead
Level 8 Advanced Data Structures Β 0/18

🎯 Goal: Solve high-rated Codeforces problems

Segment Structures

  • βšͺ Segment tree
  • βšͺ Lazy propagation
  • βšͺ Fenwick tree (BIT)
  • βšͺ Range minimum query
  • 🟒 Merge sort tree
  • 🟒 Segment tree beats
  • 🟒 2D Fenwick tree
  • 🟒 Persistent segment tree

Advanced Trees

  • βšͺ Disjoint Set Union (DSU)
  • βšͺ Treap
  • βšͺ Persistent DS
  • βšͺ Centroid decomposition
  • 🟒 DSU on tree β€” small-to-large
  • 🟒 Sqrt decomposition
  • 🟒 Mo's algorithm
  • 🟒 Offline queries
  • πŸ”΄ Link-cut trees
  • πŸ”΄ Treap β€” use policy tree instead
Level 9 Strings & Geometry Β 0/23

🎯 Goal: Reach Specialist-level mastery

String Algorithms

  • βšͺ KMP
  • βšͺ Z Algorithm
  • βšͺ Rabin-Karp
  • βšͺ Manacher's algorithm
  • βšͺ Aho-Corasick
  • βšͺ Suffix Array
  • βšͺ Trie
  • 🟒 Suffix Automaton (SAM)
  • 🟒 Palindromic tree (Eertree)
  • 🟒 Lyndon factorization
  • πŸ”΄ Suffix Tree β€” use SA+LCP instead
  • πŸ”΄ Lyndon factorization (rare in contests)

Geometry

  • βšͺ Points & vectors
  • βšͺ Line intersection
  • βšͺ Polygon area
  • βšͺ Convex hull
  • βšͺ Sweep line
  • 🟒 Cross product / dot product
  • 🟒 Point in polygon
  • 🟒 Rotating calipers
  • 🟒 Half-plane intersection
  • πŸ”΄ Circle intersection
  • πŸ”΄ Half-plane intersection β€” niche
Level 10 Greedy & Proof Techniques Β 0/18

🎯 Goal: Think mathematically and prove your solutions

Greedy Algorithms

  • βšͺ Activity selection
  • βšͺ Interval scheduling
  • βšͺ Fractional knapsack
  • βšͺ Change making
  • 🟒 Greedy on graphs
  • 🟒 Earliest deadline first
  • 🟒 Scheduling problems
  • πŸ”΄ Huffman coding
  • πŸ”΄ Matroid theory

Proof Techniques

  • βšͺ Exchange argument
  • βšͺ Stay ahead
  • βšͺ Induction
  • βšͺ Contradiction
  • 🟒 Invariant method
  • 🟒 Monovariant
  • 🟒 Pigeonhole principle
  • 🟒 Double counting
  • πŸ”΄ Matroid theory β€” academic only
Level B CP Meta-Skills (Bonus) Β 0/13

🎯 Goal: Often overlooked β€” separates good from great

Contest Strategy

  • 🟒 Problem reading speed
  • 🟒 Identifying problem type quickly
  • 🟒 Time allocation per problem
  • 🟒 Stress testing
  • 🟒 Debugging under time pressure
  • 🟒 Penalty awareness β€” CF scoring

Misc. Techniques

  • 🟒 Coordinate compression
  • 🟒 Offline processing
  • 🟒 Randomization & heuristics
  • 🟒 Constructive algorithms
  • 🟒 Simulation problems
  • 🟒 Interactive problems
  • 🟒 Ternary search on unimodal functions

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages