I am trying to start my journey in the field of competitive programming. So while finding guidance, I found this awesome video , containing the total roadmap for someone starting in this field. This post is totally based on that youtube video by take U forward.
This post would work as the note for me , as well as all for you. I highly recommend you watch the video as well as follow this post for keeping track of the progress, if you are in the starting, as well as in middle of your competitive programming path.
- Do a bunch of pattern printing problems.[start here]
- Learn about analysis of time complexity.
- Linear search for basic traversal.
- Implementing circular array.[article1][article2]
- Basic number theory concepts.[article1][article2]
- Know about Palindrome and other numbers (Perfect, Armstrong…)
- Simple Hashing problems.
- Learn prefix sum algorithms. [1d and 2d problems]
- Sliding window techniques. **
- Learn Binary Search.
- Euclidean Algorithm and Extended Euclidean algorithm.
- GCD of two numbers in O(n) time.
- Linear Diphantine Equation.
- Checking primes in O(sqrt(n)) complexity.
- Sieve of Eratosthenes
- Segmented Sieve.
- Find prime factorization of a number in O(lg(n)) using Sieve.
- Euler Totient Function [GFG article] [HackerEarth problems]
- Fermat Little Theorem[GFG article] [HackerEarth problems]
- Wilson’s Theorem[GFG article] [HackerEarth problems]
- Finding xⁿ in O(log(n)) time.
- Modular Arithmetic
- Modular Inverse of a term.
- Modular Exponentiation.
- Chinese Remainder Theorem
- Factorial Modulo Mod.
- Finding ⁿCᵣ and ⁿpᵣ for queries.
- Inclusion Exclusion principle.[practice combinatrix problems from HackerEarth]
- Learn basic sorting Algorithms.
- Practice problems which are constructive and have swapping terms.
- Problems related to 2-pointer approach.
- Bit Manipulation[Left shift] [Right Shift] [Set bit][MSB][LSB]
- Power set of given array or a string using Bit.
- Number of subarrays with XOR or Zero
- Greedy Algorithm Concept and problems
- Kadane’s algorithm, Job Sequencing and Activity selection problem
- Basic RECURSION PROBLEMS like finding factorials.
- Implementing Binary Search
- Implementing Modular exponentiation.
- Finding subset with given Sum.
- Implementing Merge sort , Quick Sort and related problems.
- Backtracking problems like Sudoku and N-queen.
- Meet in the middle algorithms and problems.
- Devide and conquer problems.
- Next greater/smaller element using stack
- Parenthesis problems using stack.[Archive]
- Largest rectangular area in histogram. **important concept
- Problems related to Heap(PriorityQueue)
- Hashing on string.[Article] [Problems]
- Rabin Carp Algorithm
- Prefix Function
- KMP Algorithm
- Z-function
- Manachers’ Algorithm
- Practice 25–30 problems on previous algorithms.
- Tree Algorithms
- DFS/BFS Traversal in Graph/Tree
- Diameter of Tree
- Euler Tour of tree
- Finding Lowest Common ancestor(LCA) using Binary Lifting
- Distance between two nodes
- Finding Lowest Common ancestor(LCA) using Euler Tour
- Subtree Problems
- Practice 25–30 problems on Tree algorithms.
- Graph Algorithms
- Connected Components
- Topological sort
- Cycle Detection in graph
- Bipartite Check in graph
- Stortest Connected Copmonent using Kosaraju’s Algorithm
- dijkstra’s Algorithm
- Bellman Ford Algorithm
- Floyd Warshall Algorithm
- Practice 25–30 problems on these Graph topics.
- Bridges in Graph
- Articulation point in Graph
- Minimum Spanning Tree using Kruskal’s Algorithm
- Prim’s Algorithm
- 0/1 BFS
- Finding Bridges online
- Practice 25–30 problems on above Graph topics.
- Dynamic Programming [Playlist(Hindi)]
- Get yourself strong with recursion before starting.
- Understand what is Memoization
- Solve common DP problems
- Solve AtCoder Educational DP Contest on Dynamic Programming.[All 26 problems]
- Solve 20–25 more problems on DP.
- Learn recurence for Digit Dynamic Programming[Good Collection]
- Dynamic Programming with Bitmasks
- Dynamic Programming on Trees
- SOS DP[Article]
- Practice 40–50 problems on DP
- Disjoint Set (Using all optimizations)
- Offline Queries using Disjoint set.
- Kruskal’s Algorithm
- Sparse Table(Not that much important)
- Fenwick Tree(Read about Range Update trick also)[Article]
- Binary Lifting on Fenwick Trees
- Solve 25–30 problems on Disjoint Set and Fenwick Tree.
- Matrix Exponentiation (Problems)
- Sqrt decomposition technique
- Update and query operations
- Mo’s Algorithm
- Mo’s algorithm on Trees
- Segment Tree *important
- Range queries and point updates
- Lazy Propagation on Segment Trees
- Sprague-Grundy Theorems
- Flows and Related Problems
- Heavy Light Decomposition
- Convex Hull Algorithm
- FFT/NTT
So, This was a list provided by Striver_79 in the video. I have linked some sources with corresponding points and plan to gradually update the post, with more learning sources, as I follow the list. For now you can use google, as well as his instructions in the video, as learning sources. He has put a lot of effort on this list. Make sure to subscribe his channel TakeUForward.
Have a good day.