This roadmap outlines the list of algorithms and functions that will be added to the repository. Each algorithm/function is listed with a checkbox to track its progress. When contributing, make sure to check the relevant box for the function you are working on, or add it to the list (if not present, create one) if it is missing.
These are fundamental algorithms and functions often used in competitive programming and data structures. These functions are implemented in the most optimal way.
- Reverse an Array (copy)
- Reverse an Array (in place)
- Find Max-Min of Array
- Prefix Array
- Suffix Array
- Finding Mex of Array (Smallest Positive integer which is not present in array)
- Print 2D Matrix
- Binary Search
- Upper bound
- Lower bound (Binary Search)
- Generate all Permutation (n!)
- Count occurrences of all elements
- Frequency Array
- Substrings (n^2)
- Generate all Substrings (Subsequences) (2^n)
- Generate all Permutation (n!)
- Palindrome Check
- Prime Check
- Sieve of Eratosthenes (upto 'n' numbers)
- nthFibonacci
- Prime Factorization
- Get all Factors (return a Map)
- GCD of 'a' and 'b' using Euclidean Algorithm
- LCM of 'a' and 'b'
- Binary Exponentiation (with modulus)
- Get Factorial upto 'n' (with modulus) (return an array)
- Get Inverse Factorial upto 'n' (with modulus) (return an array)
- nPr (Permutation with modulus)
- nCr (Combination with modulus)
- Depth-First Search (DFS) (Recursive)
- Breadth-First Search (BFS)
- Depth-First Search (DFS) (Iterative)
- Dijkstra's Shortest Path Algorithm
- Bellman-Ford Algorithm
- Kruskal's Algorithm
- Prim's Algorithm
- Floyd-Warshall Algorithm (All-Pairs Shortest Path)
- Disjoint Set Union (size-based) (TC: O(n*a(n)))
- Disjoint Set Union (rank-based) (TC: O(n*a(n)))
- Binary Lifting
- Euler Tour Traversal
- Fenwick Tree (Point Update, Range Query)
- Sparse Table (Min, Max, And, Or, Gcd, Lcm)
- Segment Tree (Min and Max both, pass the function name as parameter in the class)