In this post “Important top 10 algorithms and data structures for competitive coding “.
Topics :
- Graph algorithms
- Dynamic programming
- Searching and Sorting:
- Number theory and Other Mathematical
- Geometrical and Network Flow Algorithms
- Data Structures

The below links cover all most important algorithms and data structure topics:
- Breadth First Search (BFS)
- Depth First Search (DFS)
- Shortest Path from source to all vertices **Dijkstra**
- Shortest Path from every vertex to every other vertex **Floyd Warshall**
- Minimum Spanning tree **Prim**
- Minimum Spanning tree **Kruskal**
- Topological Sort
- Johnson’s algorithm
- Articulation Points (or Cut Vertices) in a Graph
- Bridges in a graph
- Longest Common Subsequence
- Longest Increasing Subsequence
- Edit Distance
- Minimum Partition
- Ways to Cover a Distance
- Longest Path In Matrix
- Subset Sum Problem
- Optimal Strategy for a Game
- 0-1 Knapsack Problem
- Assembly Line Scheduling
- Binary Search
- Quick Sort
- Merge Sort
- Order Statistics
- KMP algorithm
- Rabin karp
- Z’s algorithm
- Aho Corasick String Matching
- Counting Sort
- Manacher’s algorithm: Part 1, Part 2 and Part 3
All Articles on Searching, Sorting and Pattern Searching.
Number theory and Other Mathematical
Prime Numbers and Prime Factorization
- Primality Test | Set 1 (Introduction and School Method)
- Primality Test | Set 2 (Fermat Method)
- Primality Test | Set 3 (Miller–Rabin)
- Sieve of Eratosthenes
- Segmented Sieve
- Wilson’s Theorem
- Prime Factorisation
- Pollard’s rho algorithm
Modulo Arithmetic Algorithms
- Basic and Extended Euclidean algorithms
- Euler’s Totient Function
- Modular Exponentiation
- Modular Multiplicative Inverse
- Chinese remainder theorem Introduction
- Chinese remainder theorem and Modulo Inverse Implementation
- nCr%m and this.
Miscellaneous:
- Counting Inversions
- Counting Inversions using BIT
- logarithmic exponentiation
- Square root of an integer
- Heavy light Decomposition , this and this
- Matrix Rank
- Gaussian Elimination to Solve Linear Equations
- Hungarian algorithm
- Link cut
- Mo’s algorithm and this
- Factorial of a large number in C++
- Factorial of a large number in Java+
- Russian Peasant Multiplication
- Catalan Number
All Articles on Mathematical Algorithms
Geometrical and Network Flow Algorithms
- Convex Hull
- Graham Scan
- Line Intersection
- Interval Tree
- Matrix Exponentiation and this
- Maxflow Ford Furkerson Algo and Edmond Karp Implementation
- Min cut
- Stable Marriage Problem
- Hopcroft–Karp Algorithm for Maximum Matching
- Dinic’s algo and e-maxx
All Articles on Geometric Algorithms
- Binary Indexed Tree or Fenwick tree
- Segment Tree (RMQ, Range Sum and Lazy Propagation)
- K-D tree (See insert, minimum and delete)
- Union Find Disjoint Set (Cycle Detection and By Rank and Path Compression)
- Tries
- Suffix array (this, this and this)
- Sparse table
- Suffix automata
- Suffix automata II
- LCA and RMQ
All Articles on Advanced Data Structures.
How to Begin?
Please see How to begin with Competitive Programming?
How to Practice?
Please see https://practice.geeksforgeeks.org/
What are top algorithms in Interview Questions?
Top 10 algorithms in Interview Questions
How to prepare for ACM – ICPC?
How to prepare for ACM – ICPC?
This is an initial draft. We will soon be adding more links and algorithms to this post. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Recommended Posts:
- Must do Math for Competitive Programming
- Overview of Data Structures | Set 3 (Graph, Trie, Segment Tree and Suffix Tree)
- Design data structures for a very large social network like Facebook or Linkedln
- BFS using STL for competitive coding
- Top 10 algorithms in Interview Questions
- Print Nodes in Top View of Binary Tree
- Top 10 Interview Questions on Depth First Search (DFS)
- Lexicographically largest prime path from top-left to bottom-right in a matrix
- Construct Binary Tree from Ancestor Matrix | Top Down Approach
- Minimum cost to reach from the top-left to the bottom-right corner of a matrix
- Compute nCr % p | Set 1 (Introduction and Dynamic Programming Solution)
- Number Theory (Interesting Facts and Algorithms)
- Longest path in a directed Acyclic graph | Dynamic Programming
- Numbers of Length N having digits A and B and whose sum of digits contain only digits A and B
- Sum and product of k smallest and k largest prime numbers in the array
- Bitwise AND of the sum of prime numbers and the sum of composite numbers in an array
- Sum and Maximum of elements in array from [L, R] before and after updates
- Maximize sum of array by reducing array elements to contain no triplets (i, j, k) where a[i] < a[j] and a[i] < a[k] and j <i < k
- Measure one litre using two vessels and infinite water supply
- Snake and Ladder Problem


