There are many algorithms across different fields of computer science and mathematics. Below is a comprehensive list of commonly used algorithms, organized by category. This list covers areas like sorting, searching, graph theory, dynamic programming, machine learning, cryptography, and more.
Sorting Algorithms
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Heap Sort
- Counting Sort
- Radix Sort
- Bucket Sort
- Shell Sort
Searching Algorithms
- Linear Search
- Binary Search
- Ternary Search
- Exponential Search
- Jump Search
- Fibonacci Search
- Interpolation Search
Graph Algorithms
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Dijkstra’s Algorithm (Shortest Path)
- Bellman-Ford Algorithm (Shortest Path with Negative Weights)
- Floyd-Warshall Algorithm (All-Pairs Shortest Path)
- A* (A-star) Algorithm
- Kruskal’s Algorithm (Minimum Spanning Tree)
- Prim’s Algorithm (Minimum Spanning Tree)
- Topological Sorting
- Tarjan’s Algorithm (Strongly Connected Components)
- Kosaraju's Algorithm (Strongly Connected Components)
- Johnson’s Algorithm (All-Pairs Shortest Path)
Dynamic Programming Algorithms
- Fibonacci Sequence (DP version)
- Knapsack Problem (0/1 and Fractional)
- Longest Common Subsequence (LCS)
- Longest Increasing Subsequence (LIS)
- Matrix Chain Multiplication
- Edit Distance (Levenshtein Distance)
- Coin Change Problem
- Rod Cutting Problem
- Subset Sum Problem
- Bellman-Ford Algorithm (as DP example for graphs)
Divide and Conquer Algorithms
- Binary Search
- Merge Sort
- Quick Sort
- Strassen’s Matrix Multiplication
- Closest Pair of Points Problem
Greedy Algorithms
- Dijkstra’s Algorithm
- Kruskal’s Algorithm
- Prim’s Algorithm
- Huffman Coding
- Activity Selection Problem
- Fractional Knapsack Problem
Backtracking Algorithms
- N-Queens Problem
- Sudoku Solver
- Graph Coloring Problem
- Hamiltonian Cycle
- Knight’s Tour Problem
String Matching Algorithms
- Naive Pattern Matching
- KMP Algorithm (Knuth-Morris-Pratt)
- Rabin-Karp Algorithm
- Z Algorithm
- Boyer-Moore Algorithm
- Aho-Corasick Algorithm
Mathematical Algorithms
- Greatest Common Divisor (GCD) (Euclidean Algorithm)
- Sieve of Eratosthenes (Prime Generation)
- Modular Exponentiation
- Fast Fourier Transform (FFT)
- Matrix Exponentiation
- Extended Euclidean Algorithm
- Chinese Remainder Theorem
- Floyd’s Tortoise and Hare (Cycle Detection)
Cryptographic Algorithms
- RSA Algorithm
- AES (Advanced Encryption Standard)
- DES (Data Encryption Standard)
- SHA (Secure Hash Algorithm)
- Elliptic Curve Cryptography (ECC)
- Diffie-Hellman Key Exchange
- MD5 Hashing Algorithm