List of 500 Computer Algorithms from Simple to Complex
Categories:
26 minute read
Computer algorithms are step-by-step procedures for solving problems or accomplishing tasks. From the simplest sorting techniques to complex machine learning models, algorithms power nearly every aspect of modern computing. This comprehensive guide presents 500 algorithms organized by complexity and application domain, each with a brief explanation.
Basic Algorithms
Searching Algorithms
- Linear Search: Sequentially checks each element in a list until the target is found. Simple but inefficient for large datasets.
- Binary Search: Divides a sorted array repeatedly in half to quickly find a target value. Much faster than a linear search for sorted data.
- Jump Search: Jumps ahead by fixed steps in a sorted array, then performs a linear search in the smaller subset. A middle ground between linear and binary search.
- Interpolation Search: This method improves binary search by estimating the position based on the search key value. It works best with uniformly distributed data.
- Exponential Search: This method finds a range where the element might exist and then applies a binary search. It is useful for unbounded or infinite arrays.
- Ternary Search: Similar to binary search but divides the array into three parts instead of two. Useful for finding extrema in unimodal functions.
- Fibonacci Search: Uses Fibonacci numbers to divide the array, requiring only addition operations. Works well with arrays that can’t be randomly accessed.
- Sentinel Linear Search: Enhances linear search by adding the target at the end to eliminate boundary checks. Slightly more efficient than a standard linear search.
- Ubiquitous Binary Search: A binary search implementation designed to avoid common pitfalls and edge cases. Handles special cases like duplicates elegantly.
- Meta Binary Search: A variant of binary search that uses fewer comparisons. Also known as one-sided binary search.
Sorting Algorithms
- Bubble Sort: Repeated steps through the list, comparing adjacent elements and swapping them if in the wrong order. Simple but inefficient for large lists.
- Selection Sort: Finds the minimum element and puts it at the beginning, then repeats for the remaining elements. Simple but inefficient for large datasets.
- Insertion Sort: Builds the sorted array one item at a time by inserting each element in its proper position. Efficient for small or nearly sorted datasets.
- Merge Sort: Divides the array into halves, sorts them recursively, then merges them. Offers consistent O(n log n) performance regardless of input.
- Quick Sort: Selects a pivot element and partitions the array around it, then recursively sorts the partitions. Fast in practice but has worst-case scenarios.
- Heap Sort: Uses a binary heap data structure to build a max/min heap and sort elements. Combines the speed of quick sort with the consistency of merge sort.
- Counting Sort: Counts occurrences of each value and reconstructs the sorted array. Very efficient for small integer ranges but uses extra space.
- Radix Sort: Sort numbers by processing individual digits from least to most significant. Linear time complexity but requires extra space.
- Bucket Sort: Distributes elements into buckets, sorts the buckets, and then concatenates them. Works well with uniformly distributed data.
- Shell Sort: Improves insertion sort by comparing elements separated by gaps. A practical algorithm for medium-sized arrays.
- Comb Sort: Improves bubble sort by using a gap larger than 1 to eliminate small values near the end. Faster than bubble sort for large lists.
- Pigeonhole Sort: Distributes each value to its pigeonhole and then retrieves them in order. Very fast when the range is small compared to items.
- Cycle Sort: Minimizes the number of memory writes by cycling through the array. Optimal for minimizing write operations.
- Cocktail Sort: A variation of bubble sort that traverses the list in both directions. Slightly more efficient than bubble sort.
- Strand Sort: Repeatedly pulls sorted sublists and merges them. Works well on partially sorted data.
- Bitonic Sort: Sorts in both ascending and descending orders, then merges the results. Designed for parallel processing.
- Pancake Sort: Sort by repeatedly flipping the prefix of the array. Named after sorting a stack of pancakes by size.
- Bingo Sort: Finds the next smallest element and moves all matching elements to their position. Works well with many duplicates.
- Gnome Sort: Similar to insertion sort but moves elements back until they’re in position. Simple implementation with reasonable performance on small datasets.
- Sleep Sort: A humorous sorting algorithm that creates a thread for each value that sleeps proportionally to its value. More of a curiosity than practical algorithm.
Basic Data Structure Algorithms
- Stack Operations: Push, pop, peek operations for last-in, first-out (LIFO) data structure. Essential for function calls, expression evaluation, and backtracking.
- Queue Operations: Enqueue and dequeue operations for first-in, first-out (FIFO) data structure. Used in breadth-first searches and scheduling.
- Linked List Operations: Insert, delete, and traverse operations for sequential data storage. Allows dynamic memory allocation and efficient insertions/deletions.
- Circular Linked List Operations: Creates a loop in a linked list with the last node pointing to the first. Useful for round-robin scheduling and certain simulations.
- Doubly Linked List Operations: Each node has pointers to both the next and previous nodes. Enables bidirectional traversal and more efficient deletions.
- Array Operations: Basic manipulations like insertion, deletion, and traversal. The foundation of many data structures and algorithms.
- Dynamic Array Implementation: Automatically resizes itself when full. Provides amortized constant-time insertion while maintaining contiguous memory.
- Hash Table Implementation: Maps keys to values using a hash function. Provides average O(1) lookup, insertion, and deletion.
- Binary Tree Traversal (Inorder): Visits left subtree, root, then right subtree. Produces sorted output for binary search trees.
- Binary Tree Traversal (Preorder): Visits root, left subtree, then right subtree. Useful for creating a copy of the tree or prefix expressions.
- Binary Tree Traversal (Postorder): Visits left subtree, right subtree, then root. Used for deletion operations or postfix expressions.
- Binary Tree Traversal (Level Order): Visits nodes level by level from top to bottom. Useful for breadth-first tree processing.
- Binary Search Tree Operations: Insert, delete, and search in a tree where left child < parent < right child. Enables fast lookups, insertions, and deletions.
- Heap Operations (Min and Max): Operations for a complete binary tree that maintains heap property. Used for priority queues and heap sort.
- Trie Implementation: A tree-like data structure for efficient retrieval of keys in a dataset of strings. Excellent for prefix-based searches and autocomplete.
Mathematical Algorithms
- Sieve of Eratosthenes: Efficiently finds all prime numbers up to a given limit. One of the most efficient ways to find prime numbers.
- Euclidean Algorithm (GCD): Finds the greatest common divisor of two numbers. A fundamental algorithm in number theory.
- Extended Euclidean Algorithm: Finds integers x and y such that ax + by = gcd(a,b). Used in modular multiplicative inverse calculations.
- Fast Exponentiation: Computes a^n using O(log n) multiplications. Significantly faster than the naive approach for large exponents.
- Primality Test (Naive Method): Checks if a number is prime by testing potential divisors. Simple but inefficient for large numbers.
- Fibonacci Generation: Generates the Fibonacci sequence where each number is the sum of the two preceding ones. A classic dynamic programming example.
- Factorial Calculation: Computes n! (the product of all positive integers less than or equal to n). Demonstrates recursion and iteration concepts.
- Prime Factorization: Decomposes a number into its prime factors. Fundamental to many cryptographic applications.
- Chinese Remainder Theorem: Solves a system of linear congruences. Essential for many applications in number theory and cryptography.
- Modular Exponentiation: Efficiently calculates a^b mod m. Critical for public-key cryptography.
- Newton’s Method for Square Root: Approximates the square root of a number through successive approximations. Demonstrates numerical analysis techniques.
- Bit Manipulation Basics: Operations like setting, clearing, toggling bits. Essential for low-level programming and optimizations.
- Matrix Multiplication: Combines two matrices to produce a third matrix. Fundamental to linear algebra and many applications.
- Pascal’s Triangle Generation: Creates a triangular array where each number is the sum of the two above it. Has numerous mathematical applications.
- Catalan Number Generation: Generates a sequence used in various combinatorial problems. Common in counting problems involving recursive structures.
Intermediate Algorithms
Graph Algorithms
- Depth-First Search (DFS): Explores as far as possible along each branch before backtracking. Used for topological sorts, connected components, and maze generation.
- Breadth-First Search (BFS): Explores all neighbors at the current depth before moving to nodes at the next depth level. Finds shortest paths in unweighted graphs.
- Dijkstra’s Algorithm: Finds shortest paths from a source node to all other nodes in a weighted graph. Optimal for graphs with non-negative weights.
- Bellman-Ford Algorithm: Computes shortest paths from a source to all vertices, even with negative edge weights. Can detect negative cycles.
- Floyd-Warshall Algorithm: Finds shortest paths between all pairs of vertices in a weighted graph. Handles negative edges but not negative cycles.
- Kruskal’s Algorithm: Finds a minimum spanning tree by adding the smallest edge that doesn’t form a cycle. Efficient with sorted edges.
- Prim’s Algorithm: Builds a minimum spanning tree by always adding the nearest vertex. Often faster than Kruskal’s for dense graphs.
- Topological Sort: Linearly orders vertices such that for every directed edge, the source comes before the destination. Essential for scheduling and dependency resolution.
- Johnson’s Algorithm: Finds shortest paths between all pairs of vertices in a sparse, weighted graph. Combines Dijkstra and Bellman-Ford for efficiency.
- A Search Algorithm*: Finds the shortest path using heuristics to guide the search. Widely used in pathfinding for games and robotics.
- Bidirectional Search: Runs two simultaneous searches from start and goal, stopping when they meet. Often faster than unidirectional search.
- Tarjan’s Algorithm: Finds strongly connected components in a directed graph. More efficient than Kosaraju’s algorithm.
- Kosaraju’s Algorithm: Another method to find strongly connected components in a directed graph. Conceptually simpler than Tarjan’s.
- Ford-Fulkerson Algorithm: Computes the maximum flow in a flow network. Fundamental to network flow problems.
- Edmonds-Karp Algorithm: Implements Ford-Fulkerson using BFS to find augmenting paths. Guarantees polynomial time complexity.
- Dinic’s Algorithm: A faster maximum flow algorithm using concepts of level graphs and blocking flows. Significantly faster than Edmonds-Karp in practice.
- Hungarian Algorithm: Solves the assignment problem in polynomial time. Optimal for matching workers to jobs with minimum cost.
- Push-Relabel Algorithm: Another approach to maximum flow problems with better theoretical complexity. Often performs well in practice.
- Hopcroft-Karp Algorithm: Finds a maximum matching in a bipartite graph. More efficient than alternating path algorithms.
- Hierholzer’s Algorithm: Finds an Eulerian circuit in a graph where all vertices have even degree. Used in circuit design and DNA fragment assembly.
- Welsh-Powell Algorithm: An efficient greedy algorithm for graph coloring. Not optimal but practical for many applications.
- Borůvka’s Algorithm: Another minimum spanning tree algorithm that works by merging components. Works well in parallel settings.
- Fleury’s Algorithm: Finds Eulerian paths or circuits by preferring non-bridge edges. Simple but not the most efficient approach.
- Bridges and Articulation Points: Identifies critical edges and vertices in a graph. Important for network reliability analysis.
- Strongly Connected Components: Divides a directed graph into maximal strongly connected subgraphs. Essential for many graph algorithms.
- Biconnected Components: Divides an undirected graph into maximal biconnected components. Used in network design and analysis.
- Eulerian Path and Circuit: Determines if a graph has a path or circuit that visits every edge exactly once. Classic problem in graph theory.
- Hamiltonian Path and Circuit: Finds a path or circuit that visits every vertex exactly once. NP-complete but important in many applications.
- Maximum Bipartite Matching: Finds the maximum set of edges without common vertices in a bipartite graph. Used in resource allocation problems.
- Graph Coloring Algorithms: Assigns colors to graph elements subject to constraints. Applications range from scheduling to register allocation.
Dynamic Programming Algorithms
- Fibonacci Sequence (DP approach): Calculates Fibonacci numbers using memoization or tabulation. Classic example of dynamic programming optimization.
- Longest Common Subsequence: Finds the longest subsequence present in two sequences. Used in diff utilities and bioinformatics.
- Longest Increasing Subsequence: Identifies the longest subsequence where each element is greater than the previous. Used in sequence analysis.
- Edit Distance: Calculates the minimum operations needed to transform one string into another. Applications in spell checkers and DNA analysis.
- 0/1 Knapsack Problem: Maximizes value of items in a knapsack with weight constraint. Classic optimization problem with many applications.
- Coin Change Problem: Determines the number of ways to make change for a given amount. Common in financial computations and algorithmic challenges.
- Matrix Chain Multiplication: Determines the most efficient way to multiply a sequence of matrices. Demonstrates optimal substructure in dynamic programming.
- Subset Sum Problem: Determines if a subset of numbers can sum to a target value. NP-complete but solvable with dynamic programming for small instances.
- Rod Cutting Problem: Maximizes profit by cutting a rod into pieces of different lengths with different prices. Classic dynamic programming example.
- Longest Palindromic Subsequence: Finds the longest subsequence that reads the same forward and backward. Used in string processing.
- Maximum Subarray Problem (Kadane’s Algorithm): Finds the contiguous subarray with the largest sum. Elegant algorithm with applications in stock price analysis.
- Shortest Common Supersequence: Finds the shortest sequence that contains both given sequences as subsequences. Used in computational biology.
- Binomial Coefficient: Efficiently calculates combinations using dynamic programming. Important in combinatorics and probability.
- Egg Dropping Puzzle: Determines minimum number of drops needed to find the critical floor. Demonstrates binary search with dynamic programming.
- Word Break Problem: Determines if a string can be segmented into dictionary words. Common in natural language processing.
- Partition Problem: Determines if a set can be divided into two subsets with equal sum. Variant of the subset sum problem.
- Box Stacking Problem: Maximizes height of a stack of boxes with constraints. Extension of the longest increasing subsequence problem.
- Longest Path in Matrix: Finds the longest increasing path in a matrix. Applications in grid-based games and geographic analysis.
- Maximum Sum Increasing Subsequence: Finds subsequence with maximum sum where each element is greater than the previous. Extension of longest increasing subsequence.
- Minimum Number of Jumps: Finds minimum jumps needed to reach the end of an array. Used in game design and optimization problems.
String Algorithms
- String Matching (Naive Method): Checks every possible position for pattern in text. Simple but inefficient for long strings.
- Rabin-Karp Algorithm: Uses hashing to find patterns in text. Efficient for multiple pattern searching.
- KMP Algorithm (Knuth-Morris-Pratt): Avoids redundant comparisons by using a prefix function. Highly efficient for single pattern matching.
- Boyer-Moore Algorithm: Skips sections of text using bad character and good suffix rules. Often outperforms other string matching algorithms.
- Z Algorithm: Efficiently finds all occurrences of a pattern in a text. Linear time complexity with simple implementation.
- Aho-Corasick Algorithm: Locates multiple patterns in a text simultaneously. Essential for applications like virus scanning.
- Suffix Array Construction: Creates an array of sorted suffixes of a string. Enables efficient string operations and searches.
- Longest Common Prefix Array: Stores the length of the longest common prefix between adjacent suffixes. Used with suffix arrays for string processing.
- Manacher’s Algorithm: Finds all palindromic substrings in linear time. Much more efficient than naive approaches.
- Suffix Tree Construction: Builds a compressed trie containing all suffixes. Powerful data structure for string operations.
- Trie-based Pattern Matching: Uses a trie structure to efficiently match multiple patterns. Common in dictionary implementations and autocomplete.
- Levenshtein Distance: Measures the difference between two strings by counting operations. Widely used in spell checking and similarity analysis.
- Longest Common Substring: Finds the longest string that is a substring of two strings. Applications in bioinformatics and plagiarism detection.
- Longest Repeated Substring: Identifies the longest substring that appears multiple times. Used in data compression and sequence analysis.
- Regular Expression Matching: Determines if a string matches a given pattern. Fundamental to text processing and validation.
- Substring Search (Finite Automaton): Constructs a finite automaton for pattern matching. Efficient for fixed patterns.
- Burrows-Wheeler Transform: Rearranges characters to improve compression. Core component of many data compression algorithms.
- Run Length Encoding: Replaces sequences of the same character with count and character. Simple compression technique for repetitive data.
- Huffman Coding: Creates optimal prefix codes based on character frequencies. Widely used in lossless data compression.
- Lempel-Ziv-Welch (LZW) Compression: Builds a dictionary of phrases for compression. Used in GIF, PDF, and many file formats.
Geometric Algorithms
- Graham Scan (Convex Hull): Finds the smallest convex polygon containing all points. Used in shape analysis and collision detection.
- Jarvis March (Gift Wrapping): Another algorithm for finding the convex hull. Conceptually simpler than Graham scan but usually slower.
- Line Intersection: Determines if and where two lines intersect. Fundamental operation in computer graphics and computational geometry.
- Point in Polygon: Checks if a point lies inside a polygon. Essential for geographic information systems and computer graphics.
- Closest Pair of Points: Finds the two closest points in a set. Applications in cluster analysis and similarity detection.
- Delaunay Triangulation: Creates triangles so no point is inside any circumcircle. Optimal for many interpolation and meshing applications.
- Voronoi Diagram: Partitions a plane into regions closest to each point. Used in many fields from robotics to epidemiology.
- Fortune’s Algorithm: Efficiently constructs Voronoi diagrams using a sweep line approach. Much faster than naive implementations.
- Sweep Line Algorithm: Solves geometric problems by moving a line across the plane. Used for intersections, unions, and other operations.
- Bentley-Ottmann Algorithm: Finds all intersections of line segments efficiently. Much faster than checking all pairs of segments.
- Ray Casting Algorithm: Determines if a point is inside a polygon by counting intersections. Simple yet effective technique.
- Point-in-Circle Test: Checks if a point lies inside a circle. Basic operation in computational geometry.
- Rotating Calipers: Solves various problems about convex polygons efficiently. Applications include diameter and minimum bounding box.
- Shoelace Formula (Polygon Area): Calculates the area of a polygon from its vertices. Simple formula with many practical applications.
- Polygon Triangulation: Divides a polygon into triangles. Used in computer graphics for rendering and computational geometry.
- KD-Tree Construction: Organizes points in k-dimensional space. Enables efficient nearest neighbor and range searches.
- Quad-Tree Construction: Recursively divides 2D space into quadrants. Used in image processing and spatial indexing.
- R-Tree Construction: Groups nearby objects with minimum bounding rectangles. Excellent for spatial database indexing.
- Bounding Volume Hierarchy: Creates a tree of bounding volumes for efficient collision detection. Widely used in physics engines and ray tracing.
- Line Segment Intersection: Determines if and where two line segments intersect. Core operation in many geometric algorithms.
Advanced Algorithms
Network Flow Algorithms
- Maximum Flow (Ford-Fulkerson Method): Calculates maximum flow from source to sink in a flow network. Foundation of network flow algorithms.
- Minimum Cost Flow: Finds the cheapest way to send a given amount of flow through a network. Applications in logistics and resource allocation.
- Maximum Bipartite Matching: Finds largest set of edges with no shared vertices in bipartite graph. Used in job assignment and resource allocation.
- Minimum Cut: Finds the minimum capacity cut that disconnects source from sink. Dual problem to maximum flow with applications in network reliability.
- Multi-source Multi-sink Flow: Extends flow algorithms to handle multiple sources and sinks. Used in complex distribution networks.
- Minimum Cost Maximum Flow: Combines maximum flow with minimum cost. Optimal for resource allocation with both capacity and cost constraints.
- Gomory-Hu Tree: Compactly represents all pairwise maximum flows. Reduces space complexity for storing flow information.
- Network Simplex Algorithm: Applies simplex method to network flow problems. Efficient for certain classes of flow problems.
- Push-Relabel Algorithm (Advanced): High-performance maximum flow algorithm. Often faster than augmenting path methods for dense graphs.
- Capacity Scaling Algorithm: Improves Ford-Fulkerson by considering larger capacities first. Better performance for networks with large capacity differences.
Computational Geometry
- Convex Hull Algorithms (Advanced): Techniques beyond basic Graham scan and Jarvis march. Optimized for specific input distributions or higher dimensions.
- Bentley-Ottmann Algorithm (Advanced): Efficient plane sweep for line segment intersections. Critical for map overlay operations in GIS.
- Segment Tree for Geometric Problems: Applies segment trees to solve range queries in geometric settings. Useful for dynamic geometric data.
- Rectangle Intersection: Finds intersections among a set of rectangles. Applications in GUI layout and geographic analysis.
- Polygon Clipping: Computes intersection, union, difference between polygons. Essential for CAD systems and GIS.
- 3D Convex Hull: Extends convex hull to three dimensions. Used in 3D modeling and computational biology.
- Alpha Shapes: Generalizes convex hull to capture the “shape” of a point set. Used in surface reconstruction and shape analysis.
- Voronoi Diagram (Fortune’s Algorithm): Divides space based on distance to points. Applications from cell phone tower placement to astronomy.
- Plane Sweep Algorithms: Solves geometric problems by sweeping a line across the plane. Efficient technique for many geometric problems.
- Area of Union of Rectangles: Calculates total area covered by a set of rectangles. Used in VLSI design and image analysis.
- Point Location in Subdivisions: Determines which region contains a query point. Fundamental operation in GIS and computer graphics.
- Geometric Hashing: Recognizes geometric objects under transformations. Used in computer vision and molecular biology.
- Minkowski Sum: Adds two sets of points to create a new geometric shape. Used in motion planning and collision detection.
- Visibility Graphs: Connects vertices if they can “see” each other. Applications in pathfinding and robot navigation.
- Art Gallery Problem: Determines minimum guards to observe an entire gallery. Classic computational geometry problem with applications in security.
Randomized Algorithms
- Randomized Quicksort: Uses random pivot selection to avoid worst-case scenarios. Practical improvement to standard quicksort.
- Karger’s Algorithm: Finds minimum cut in a graph using random contractions. Simple yet effective probabilistic approach.
- Reservoir Sampling: Selects k random samples from a stream of unknown size. Essential for big data sampling.
- Monte Carlo Methods: Uses random sampling to obtain numerical results. Applications range from integration to simulation.
- Las Vegas Algorithms: Randomized algorithms that always give correct results but with varying runtime. Contrast to Monte Carlo methods.
- Random Projection: Projects high-dimensional data to lower dimensions. Used in dimensionality reduction and approximate nearest neighbor search.
- Bloom Filter: Space-efficient probabilistic data structure for membership testing. Used in databases and distributed systems.
- Randomized Min-Cut: Finds approximate minimum cuts with high probability. Faster than deterministic methods for large graphs.
- Skip Lists: Probabilistic alternative to balanced trees. Simpler implementation with comparable performance.
- Randomized Binary Search Trees: Uses randomization to maintain balance. Simpler than deterministic balanced trees.
- Probabilistic Counting: Estimates cardinality of large sets. Used in databases and networking.
- Simulated Annealing: Probabilistic technique for approximating global optimization. Applications in VLSI design and scheduling.
- Random Sample Consensus (RANSAC): Estimates parameters from data containing outliers. Widely used in computer vision.
- Locality-Sensitive Hashing: Hashes similar items to same buckets with high probability. Essential for approximate nearest neighbor search in high dimensions.
- Genetic Algorithms: Mimics natural selection to find solutions to optimization problems. Applications in design, machine learning, and scheduling.
Approximation Algorithms
- Traveling Salesman Problem (Approximations): Finds approximate solutions to the NP-hard TSP. Critical for logistics and routing.
- Vertex Cover Approximation: Approximates minimum vertex cover within bounded error. Important graph optimization problem.
- Set Cover Approximation: Approximates minimum set cover within logarithmic factor. Applications in facility location and monitoring.
- Bin Packing Approximation: Approximates optimal packing of items into containers. Used in storage optimization and scheduling.
- Knapsack Approximation: Approximates solution to NP-complete knapsack problem. Used when exact algorithms are too slow.
- Maximum Cut Approximation: Approximates maximum cut in a graph. Applications in network design and VLSI layout.
- Steiner Tree Approximation: Approximates minimum-weight tree connecting specified vertices. Used in network design and VLSI routing.
- k-center Problem Approximation: Approximates placement of k facilities to minimize maximum distance. Applications in facility location and emergency services.
- Facility Location Problem: Approximates optimal placement of facilities to minimize costs. Used in supply chain and service deployment.
- Metric TSP Approximation: Approximates TSP when distances satisfy triangle inequality. Better guarantees than general TSP approximation.
Advanced Data Structures
- Segment Tree: A tree data structure for interval queries and updates. Powerful for range queries with updates.
- Fenwick Tree (Binary Indexed Tree): Efficiently updates elements and calculates prefix sums. Simpler than segment trees for certain operations.
- Red-Black Tree: Self-balancing binary search tree with good worst-case guarantees. Used in many standard libraries.
- AVL Tree: First self-balancing binary search tree invented. Maintains stricter balance than red-black trees.
- Splay Tree: Self-adjusting binary search tree that moves recently accessed nodes to root. Good amortized performance.
- B-Tree: Self-balancing tree with nodes containing multiple keys. Optimized for reading and writing large blocks of data.
- B+ Tree: Variation of B-tree with all keys and data in leaves. Standard indexing structure in databases.
- Treap: Binary search tree with randomly assigned priorities. Combines advantages of trees and heaps.
- Skip List: Probabilistic multi-level linked list. Alternative to balanced trees with simpler implementation.
- Quadtree: Tree where each node has four children, used to partition 2D space. Applications in image processing and spatial indexing.
- Octree: Tree where each node has eight children, used to partition 3D space. Used in 3D graphics and spatial partitioning.
- R-Tree: Tree for spatial indexing of multi-dimensional data. Standard in GIS and spatial databases.
- k-d Tree: Space-partitioning structure for organizing points in k-dimensional space. Efficient for nearest neighbor searches.
- Interval Tree: Stores intervals for efficient intersection queries. Used in scheduling and temporal databases.
- Range Tree: Multi-dimensional search structure for range queries. Generalizes binary search trees to higher dimensions.
- Suffix Tree: Represents all suffixes of a string for pattern matching. Powerful but memory-intensive string data structure.
- Suffix Array: More space-efficient alternative to suffix trees. Used in text processing and bioinformatics.
- Rope (Data Structure): Represents strings as balanced binary trees. Efficient for large string operations.
- Bloom Filter: Space-efficient probabilistic structure for membership testing. Used in caches, databases, and network applications.
- Disjoint Set (Union Find): Tracks elements partitioned into disjoint subsets. Essential for Kruskal’s algorithm and dynamic connectivity.
- Fibonacci Heap: Advanced priority queue with amortized constant time for many operations. Theoretically optimal for certain algorithms.
- Binomial Heap: Priority queue consisting of binomial trees. Efficient merging operation.
- Persistent Data Structures: Preserves previous versions when modified. Used in functional programming and version control.
- Van Emde Boas Tree: Priority queue with O(log log n) operations. Efficient for integer keys in a bounded universe.
- Tango Tree: Binary search tree with optimal competitive ratio. Theoretical data structure for online BST operations.
- Ternary Search Tree: Hybrid of binary search trees and tries. Space-efficient for character-based keys.
- X-Fast Trie: Data structure for integers with O(log log n) predecessor queries. Used for small universes of keys.
- Y-Fast Trie: Improvement on X-Fast Trie for larger universes. Better space complexity with similar time bounds.
- Wavelet Tree: Represents sequences for rank/select queries. Applications in text indexing and computational geometry.
- Dancing Links: Technique for efficiently implementing backtracking algorithms. Famous for solving exact cover problems like Sudoku.
Specialized Domains
Cryptographic Algorithms
- RSA Algorithm: Public-key cryptosystem based on the difficulty of factoring large primes. Widely used for secure communications.
- AES (Advanced Encryption Standard): Symmetric encryption standard used worldwide. Replaced DES as the standard for secure communications.
- DES (Data Encryption Standard): Older symmetric encryption standard. Now considered insecure due to small key size.
- Blowfish: Symmetric block cipher designed as an alternative to DES. Still secure for many applications.
- RC4: Stream cipher once widely used in protocols like SSL. Now deprecated due to discovered vulnerabilities.
- Diffie-Hellman Key Exchange: Method for securely exchanging cryptographic keys over public channels. Foundation of many secure protocols.
- ElGamal Encryption: Public-key cryptosystem based on discrete logarithm problem. Used for digital signatures and encryption.
- DSA (Digital Signature Algorithm): Standard for digital signatures. Widely used for document authentication.
- ECDSA (Elliptic Curve Digital Signature): Elliptic curve version of DSA. More efficient with smaller keys.
- SHA (Secure Hash Algorithms) Family: Set of cryptographic hash functions designed by NSA. Essential for data integrity verification.
- MD5 (Message Digest Algorithm): Once popular hash function now broken. Still used for non-security applications.
- Keccak (SHA-3): Modern hash function selected as the new SHA-3 standard. Resistant to attacks that break MD5 and SHA-1.
- HMAC (Hash-based Message Authentication): Technique for message authentication using hash functions. Provides integrity and authenticity.
- Merkle-Hellman Knapsack: One of the earliest public key cryptosystems. Based on the knapsack problem.
- Zero-Knowledge Proofs: Protocols where one party proves knowledge without revealing the knowledge itself. Used in privacy-preserving applications.
- Homomorphic Encryption: Allows computation on encrypted data without decryption. Revolutionary for privacy-preserving computation.
- Lattice-based Cryptography: Post-quantum cryptographic systems based on lattice problems. Resistant to quantum computer attacks.
- Post-Quantum Cryptographic Algorithms
- BLS Signatures
- Schnorr Signatures
Machine Learning Algorithms
- Linear Regression
- Logistic Regression
- Decision Trees
- Random Forest
- Support Vector Machines
- Naive Bayes Classifier
- k-Nearest Neighbors
- K-Means Clustering
- DBSCAN Clustering
- Hierarchical Clustering
- Principal Component Analysis
- Linear Discriminant Analysis
- Neural Networks (Basic)
- Convolutional Neural Networks
- Recurrent Neural Networks
- Long Short-Term Memory (LSTM)
- Gated Recurrent Units (GRU)
- Autoencoders
- Generative Adversarial Networks
- Reinforcement Learning Algorithms
- Q-Learning
- Deep Q-Network
- Policy Gradient Methods
- Actor-Critic Models
- Genetic Algorithms
- Particle Swarm Optimization
- Association Rule Learning
- AdaBoost
- Gradient Boosting
- XGBoost
Natural Language Processing
- TF-IDF (Term Frequency-Inverse Document Frequency)
- Word2Vec
- GloVe (Global Vectors for Word Representation)
- FastText
- BERT (Bidirectional Encoder Representations from Transformers)
- GPT (Generative Pre-trained Transformer)
- T5 (Text-to-Text Transfer Transformer)
- Transformer Architecture
- Hidden Markov Models
- Latent Dirichlet Allocation
- Conditional Random Fields
- Sentiment Analysis Algorithms
- Named Entity Recognition
- Part-of-Speech Tagging
- Text Summarization Algorithms
- Machine Translation Algorithms
- Text Classification Algorithms
- Question Answering Systems
- Dialogue Systems
- Language Modeling Algorithms
Computer Vision Algorithms
- Edge Detection (Sobel, Canny)
- Hough Transform
- SIFT (Scale-Invariant Feature Transform)
- SURF (Speeded-Up Robust Features)
- ORB (Oriented FAST and Rotated BRIEF)
- Histogram of Oriented Gradients (HOG)
- Face Detection (Viola-Jones)
- Object Detection (R-CNN family)
- YOLO (You Only Look Once)
- SSD (Single Shot MultiBox Detector)
- Optical Flow
- Image Segmentation Algorithms
- Watershed Algorithm
- Mean Shift Segmentation
- GrabCut Algorithm
- Active Contours
- Level Set Methods
- Image Registration
- Structure from Motion
- Visual SLAM (Simultaneous Localization and Mapping)
Bioinformatics Algorithms
- Needleman-Wunsch Algorithm
- Smith-Waterman Algorithm
- BLAST (Basic Local Alignment Search Tool)
- FASTA Algorithm
- Phylogenetic Tree Construction
- Hidden Markov Models for Gene Prediction
- Burrows-Wheeler Aligner
- Pairwise Sequence Alignment
- Multiple Sequence Alignment
- de Bruijn Graph Assembly
- Genome Assembly Algorithms
- Protein Structure Prediction
- RNA Folding Algorithms
- Gene Finding Algorithms
- Molecular Dynamics Simulations
- Metropolis-Hastings Algorithm (for Bioinformatics)
- Gibbs Sampling
- Molecular Docking Algorithms
- Protein-Protein Interaction Prediction
- Genome-Wide Association Studies
Distributed Algorithms
- Paxos Algorithm
- Raft Consensus Algorithm
- Byzantine Fault Tolerance
- Gossip Protocol
- Distributed Hash Tables
- Chord Protocol
- Kademlia
- MapReduce
- Bulk Synchronous Parallel
- Chandy-Lamport Algorithm
- Vector Clocks
- Lamport Timestamps
- Two-Phase Commit
- Three-Phase Commit
- Distributed Snapshots
- Logical Clock Algorithms
- Consistent Hashing
- Leader Election Algorithms
- Distributed Mutual Exclusion
- Quorum-based Algorithms
Quantum Algorithms
- Shor’s Algorithm
- Grover’s Algorithm
- Quantum Fourier Transform
- Quantum Phase Estimation
- Deutsch-Jozsa Algorithm
- Simon’s Algorithm
- Quantum Teleportation
- Quantum Error Correction
- Quantum Walks
- Quantum Machine Learning Algorithms
- Variational Quantum Eigensolver
- Quantum Approximate Optimization Algorithm
- Quantum Support Vector Machines
- Quantum Principal Component Analysis
- Quantum Neural Networks
Complex and Specialized Algorithms
Operations Research Algorithms
- Simplex Algorithm
- Interior Point Methods
- Branch and Bound
- Branch and Cut
- Dynamic Programming for Operations Research
- Goal Programming
- Multi-Objective Optimization
- Stochastic Programming
- Quadratic Programming
- Integer Programming
- Mixed Integer Linear Programming
- Constraint Programming
- Vehicle Routing Algorithms
- Job Shop Scheduling
- Resource-Constrained Project Scheduling
- Critical Path Method
- PERT (Program Evaluation and Review Technique)
- Inventory Optimization
- Supply Chain Optimization
- Queueing Theory Algorithms
Computational Complexity and Advanced Theory
- P vs NP Problem Approaches
- NP-Hard Problem Approximations
- NP-Complete Problem Reductions
- Polynomial-Time Approximation Schemes
- Fixed-Parameter Tractable Algorithms
- Streaming Algorithms
- Online Algorithms
- External Memory Algorithms
- Cache-Oblivious Algorithms
- Self-Stabilizing Algorithms
- Parameterized Algorithms
- Fine-Grained Complexity Algorithms
- Communication Complexity
- Information-Theoretic Algorithms
- Algebraic Algorithms
Advanced AI and Machine Learning
- Deep Reinforcement Learning
- Meta-Learning
- Few-Shot Learning
- Zero-Shot Learning
- Transfer Learning
- Federated Learning
- Ensemble Methods
- Self-Supervised Learning
- Contrastive Learning
- Multi-Task Learning
- Neuroevolution
- Neural Architecture Search
- Hyperparameter Optimization
- Bayesian Optimization
- Differentiable Neural Computers
- Neural Turing Machines
- Memory-Augmented Neural Networks
- Capsule Networks
- Graph Neural Networks
- Transformers (Advanced Variants)
- Mixture of Experts
- Neural Radiance Fields
- Diffusion Models
- Flow-based Generative Models
- Energy-Based Models
- Neural Ordinary Differential Equations
- Symbolic Regression
- Automated Machine Learning (AutoML)
- Interpretable Machine Learning
- Explainable AI
Domain-Specific Advanced Algorithms
- Financial Trading Algorithms
- Option Pricing Algorithms
- Risk Management Algorithms
- Credit Scoring Algorithms
- SLAM (Advanced Robotics)
- Motion Planning Algorithms
- Speech Recognition Algorithms
- Speaker Identification
- Music Generation Algorithms
- Recommendation Systems (Advanced)
- Collaborative Filtering (Advanced)
- Content-Based Filtering (Advanced)
- Time Series Forecasting
- Anomaly Detection Algorithms
- Climate Modeling Algorithms
- Fluid Dynamics Simulations
- Structural Analysis Algorithms
- Finite Element Methods
- Monte Carlo Simulations (Advanced)
- Reinforcement Learning for Games
- Decision-making under Uncertainty
- Multi-Agent Systems
- Strategic Reasoning Algorithms
- Causal Inference Algorithms
- Treatment Effect Estimation
- Differential Privacy Algorithms
- Secure Multi-Party Computation
- Homomorphic Encryption (Advanced)
- DNA Computing Algorithms
- Neuromorphic Computing Algorithms
- Knowledge Graph Algorithms
- Ontology Reasoning
- Semantic Web Algorithms
- Automated Theorem Proving
- Satisfiability Modulo Theories
- Model Checking Algorithms
- Program Synthesis
- Automated Program Repair
- Static Analysis Algorithms
- Dynamic Analysis Algorithms
- Concurrent Algorithm Verification
- Distributed Algorithm Verification
- Software Testing Algorithms
- Mutation Testing
- Fuzz Testing Algorithms
- Compiler Optimization Algorithms
- Just-In-Time Compilation
- Register Allocation
- Instruction Scheduling
- Loop Optimization
- Memory Hierarchy Optimization
- Garbage Collection Algorithms
- Runtime Systems Algorithms
- Swarm Intelligence
- Ant Colony Optimization
- Artificial Immune Systems
- Evolutionary Computation
- Differential Evolution
- Hybrid Metaheuristics
- Hyperheuristics
Conclusion
This extensive list of algorithms demonstrates the incredible breadth and depth of computer science. From simple sorting methods that beginners learn in their first programming classes to cutting-edge AI and quantum computing algorithms pushing the boundaries of what’s possible, algorithms are the backbone of computational problem-solving.
As technology continues to evolve, new algorithms will emerge to solve increasingly complex problems and optimize existing solutions. Whether you’re a student, researcher, or industry professional, understanding these algorithmic building blocks is essential for advancing in the field of computer science.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.