The Algorithms
Search any algorithm
About
Donate
C++
GitHub repository
Documentation
Backtracking
Backtracking
N Queens All Solution Optimised
More
Backtracking
Rat Maze
More
Backtracking
Subarray Sum
More
Backtracking
Wildcard Matching
More
Backtracking
Generate Parentheses
More
Backtracking
Magic Sequence
More
Backtracking
Sudoku Solver
+1
More
Backtracking
Graph Coloring
More
Backtracking
N Queens
More
Backtracking
Minimax
More
Backtracking
Nqueen Print All Solutions
More
Backtracking
Knight Tour
More
Bit Manipulation
Bit Manipulation
Count of Trailing Ciphers in Factorial N
More
Bit Manipulation
Set Kth Bit
More
Bit Manipulation
Next Higher Number with Same Number of Set Bits
More
Bit Manipulation
Count Bits Flip
More
Bit Manipulation
Find Non Repeating Number
More
Bit Manipulation
Power of 2
More
Bit Manipulation
Travelling Salesman Using Bit Manipulation
More
Bit Manipulation
Count of Set Bits
More
Blockchain
Blockchain
Modular Division
More
Ciphers
Ciphers
Elliptic Curve Key Exchange
More
Ciphers
Vigenere Cipher
More
Ciphers
Atbash Cipher
More
Ciphers
Caesar Cipher
More
Ciphers
Base 64 Encoding
More
Ciphers
XOR Cipher
+2
More
Ciphers
Hill Cipher
More
Ciphers
Morse Code
More
Ciphers
Uint 128 T
More
Ciphers
A 1z 26 Cipher
More
Ciphers
Uint 256 T
More
Compression
Compression
Huffman
More
Conversions
Conversions
Decimal to Binary
+4
More
Conversions
Decimal to Hexadecimal
More
CPU Scheduling Algorithms
CPU Scheduling Algorithms
Fcfs Scheduling
More
Data Structures
Data Structures
/
Binary Tree
Lowest Common Ancestor
More
Data Structures
/
Linked List
Circular Linked List
More
Data Structures
Stack
+2
More
Data Structures
Disjoint Set
More
Data Structures
Tree 234
More
Data Structures
Trie Using Hashmap
More
Data Structures
Binary Search Tree 2
More
Data Structures
/
Binary Tree
AVL Tree
+2
More
Data Structures
/
Stacks
Stack with Singly Linked List
+3
More
Data Structures
Queue Using Two Stacks
More
Data Structures
Queue Using Array
More
Data Structures
Trie Modern
More
Data Structures
Circular Queue Using Linked List
More
Data Structures
List Array
More
Data Structures
Queue Using Linked List
More
Data Structures
Stack Using Array
More
Data Structures
Reverse a Linked List
More
Data Structures
Dsu Union Rank
More
Data Structures
Queue Using Linked List
More
Data Structures
/
Linked List
Skip List
More
Data Structures
/
Linked List
Doubly Linked List
+3
More
Data Structures
Linkedlist Implentation Usingarray
More
Data Structures
Node
More
Data Structures
Cll
More
Data Structures
Cll
More
Data Structures
/
CLL
Main Cll
More
Data Structures
Morrisinorder
More
Data Structures
Dsu Path Compression
More
Data Structures
/
Binary Tree
Treap
More
Data Structures
Stack Using Queue
More
Data Structures
/
Binary Tree
Binary Search Tree
+3
More
Data Structures
/
Binary Tree
Segment Tree
+3
More
Data Structures
Tree
More
Data Structures
Queue Using Array 2
More
Data Structures
Binaryheap
More
Data Structures
Rb Tree
More
Data Structures
Queue
+1
More
Data Structures
/
Hashing
Bloom Filter
More
Data Structures
Trie Tree
More
Data Structures
Sparse Table
More
Data Structures
Linked List
+1
More
Data Structures
/
Binary Tree
Fenwick Tree
More
Data Structures
Sparse Table
More
Data Structures
/
Stacks
Postfix Evaluation
More
Divide and Conquer
Divide and Conquer
Strassen Matrix Multiplication
More
Divide and Conquer
Karatsuba Algorithm for Fast Multiplication
More
Divide and Conquer
Mergesort
+18
More
Dynamic Programming
Dynamic Programming
Longest Palindromic Subsequence
More
Dynamic Programming
Abbreviation
More
Dynamic Programming
Subset Sum
More
Dynamic Programming
Shortest Common Supersequence
More
Dynamic Programming
Palindrome Partitioning
More
Dynamic Programming
Word Break
More
Dynamic Programming
Longest Increasing Subsequence
More
Dynamic Programming
Maximum Circular Subarray
More
Dynamic Programming
Minimum Edit Distance
More
Dynamic Programming
Longest Common Subsequence
+1
More
Dynamic Programming
/
Sliding Window
House Robber
More
Dynamic Programming
Longest Increasing Subsequence (Nlogn)
More
Dynamic Programming
Longest Common String
More
Dynamic Programming
Catalan Numbers
More
Dynamic Programming
Partition Problem
More
Dynamic Programming
Tree Height
More
Dynamic Programming
Searching of Element in Dynamic Array
More
Dynamic Programming
Floyd Warshall
+3
More
Dynamic Programming
0 1 Knapsack
More
Dynamic Programming
Coin Change
+4
More
Dynamic Programming
Coin Change Topdown
More
Dynamic Programming
Cut Rod
More
Dynamic Programming
Kadane
More
Dynamic Programming
Edit Distance
+1
More
Dynamic Programming
Fibonacci Bottom Up
More
Dynamic Programming
Matrix Chain Multiplication
More
Dynamic Programming
Kadane 2
More
Dynamic Programming
Egg Dropping Puzzle
More
Dynamic Programming
Subset Sum
More
Dynamic Programming
Knapsack
+2
More
Games
Games
Memory Game
More
Geometry
Geometry
Line Segment Intersection
More
Geometry
Graham Scan Algorithm
More
Geometry
Graham Scan Functions
More
Geometry
Jarvis Algorithm
More
Graphics
Graphics
Spirograph
More
Graphs
Graphs
Connected Components
More
Graphs
Is Graph Bipartite
More
Graphs
Connected Components with Dsu
More
Graphs
Dijkstra
+3
More
Graphs
Bi Directional Dijkstra
More
Graphs
Kosaraju
More
Graphs
Bridge Finding with Tarjan Algorithm
More
Graphs
Breadth First Search
+3
More
Graphs
Topological Sort by Kahns Algo
More
Graphs
Cycle Check Directed Graph
More
Graphs
Prim
More
Graphs
Depth First Search with Stack
More
Graphs
Kruskal
More
Graphs
Travelling Salesman Problem
More
Graphs
Depth First Search
+4
More
Graphs
Max Flow with Ford Fulkerson and Edmond Karp Algo
More
Graphs
Hamiltons Cycle
More
Graphs
Is Graph Bipartite 2
More
Graphs
Hopcroft Karp
More
Graphs
Bellman Ford
+3
More
Graphs
Dijkstra
+3
More
Greedy Algorithms
Greedy Algorithms
Kruskals Minimum Spanning Tree
More
Greedy Algorithms
Jumpgame
More
Greedy Algorithms
Prims Minimum Spanning Tree
More
Greedy Algorithms
Boruvkas Minimum Spanning Tree
More
Hashing
Hashing
Sha 256
More
Hashing
Quadratic Probing Hash Table
More
Hashing
Md 5
More
Hashing
Sha 1
More
Hashing
Linear Probing Hash Table
More
Hashing
Double Hash Hash Table
More
Hashing
Chaining
More
Machine Learning
Machine Learning
Vector Ops
More
Machine Learning
Kohonen Som Topology
More
Machine Learning
Ordinary Least Squares Regressor
More
Machine Learning
K Nearest Neighbors
More
Machine Learning
Neural Network
More
Machine Learning
A Star Search
More
Machine Learning
Kohonen Som Trace
More
Machine Learning
Adaline Learning
More
Math
Math
Armstrong Number
+7
More
Math
Iterative Factorial
More
Math
Power for Huge Numbers
More
Math
Fibonacci Sum
More
Math
Quadratic Equations Complex Numbers
More
Math
Ncr Modulo P
More
Math
Modular Inverse Simple
More
Math
Extended Euclid Algorithm
More
Math
N Choose R
More
Math
N Bonacci
More
Math
Eratosthenes
More
Math
Fibonacci Large
More
Math
Approximate Pi
More
Math
Euler's Totient
+1
More
Math
Sieve of Eratosthenes
+4
More
Math
Gcd of N Numbers
More
Math
Double Factorial
More
Math
Volume
More
Math
Check Factorial
More
Math
Prime
+7
More
Math
Modular Exponentiation
More
Math
Complex Numbers
More
Math
Gcd Recursive Euclidean
More
Math
Sum of Binomial Coefficient
More
Math
Area
More
Math
Integral Approximation 2
More
Math
Fibonacci Numbers
+10
More
Math
Fibonacci Matrix Exponentiation
More
Math
Realtime Stats
More
Math
Gcd Iterative Euclidean
More
Math
Binomial Calculate
More
Math
Linear Recurrence Matrix
More
Math
Large Number
More
Math
Primes up to Billion
More
Math
Least Common Multiple
More
Math
Integral Approximation
More
Math
Largest Power
More
Math
Fibonacci Fast
More
Math
Prime
+7
More
Math
Power of Two
More
Math
Prime Factorization
More
Math
Finding Number of Digits in a Number
More
Math
Armstrong Number
+7
More
Math
Sum of Digits
+1
More
Math
Number of Positive Divisors
More
Math
Perimeter
More
Math
Check Amicable Pair
More
Math
Vector Cross Product
More
Math
Fast Power
More
Math
Modular Inverse Fermat Little Theorem
More
Math
Binary Exponent
More
Math
LCM
+2
More
Math
Sqrt Double
More
Math
Miller Rabin
More
Math
Aliquot Sum
+4
More
Math
Magic Number
More
Math
String Fibonacci
More
Math
Inv Sqrt
More
Math
Factorial
+11
More
Math
Large Factorial
More
Math
Qr Decomposition
More
Math
Runge Kutta
More
Math
Bisection Method
More
Math
Matrix Exponentiation
More
Matrix
Matrix
Pascal Triangle
More
Matrix
Spiral Print
More
Numerical Analysis
Numerical Analysis
Lu Decomposition
More
Numerical Analysis
Gaussian Elimination
More
Numerical Methods
Numerical Methods
Successive Approximation
More
Numerical Methods
Composite Simpson Rule
More
Numerical Methods
Gram Schmidt
More
Numerical Methods
Inverse Fast Fourier Transform
More
Numerical Methods
Midpoint Integral Method
More
Numerical Methods
Qr Decompose
More
Numerical Methods
Newton Raphson Method
More
Numerical Methods
Fast Fourier Transform
More
Numerical Methods
Qr Eigen Values
More
Numerical Methods
Lu Decompose
More
Numerical Methods
Ode Semi Implicit Euler
More
Numerical Methods
False Position
More
Numerical Methods
Babylonian Method
More
Numerical Methods
Golden Search Extrema
More
Numerical Methods
Brent Method Extrema
More
Numerical Methods
Ode Midpoint Euler
More
Numerical Methods
Durand Kerner Roots
More
Numerical Methods
Ode Forward Euler
More
Operations on Datastructures
Operations on Datastructures
Circular Queue Using Array
More
Operations on Datastructures
Selectionsortlinkedlist
More
Operations on Datastructures
Reverse Binary Tree
More
Operations on Datastructures
Trie Multiple Search
More
Operations on Datastructures
Intersection of Two Arrays
More
Operations on Datastructures
Reverse a Linked List Using Recusion
More
Operations on Datastructures
Array Right Rotation
More
Operations on Datastructures
Get Size of Linked List
More
Operations on Datastructures
Union of Two Arrays
More
Operations on Datastructures
Array Left Rotation
More
Operations on Datastructures
Inorder Successor of Bst
More
Others
Others
Sparse Matrix
More
Others
Smallest Circle
More
Others
Buzz Number
More
Others
Recursive Tree Traversal
More
Others
Kelvin to Celsius
More
Others
Easter
More
Others
Kadanes 3
More
Others
Tower of Hanoi
+1
More
Others
Palindrome of Number
More
Others
Happy Number
More
Others
Stairs Pattern
More
Others
Fast Integer Input
More
Others
Paranthesis Matching
More
Others
Vector Important Functions
More
Others
Lru Cache
More
Others
Iterative Tree Traversals
More
Others
Decimal to Roman Numeral
More
Physics
Physics
Ground to Ground Projectile Motion
More
Probability
Probability
Bayes Theorem
More
Probability
Windowed Median
More
Probability
Geometric Dist
More
Probability
Addition Rule
More
Probability
Poisson Dist
More
Probability
Binomial Dist
More
Range Queries
Range Queries
Prefix Sum Array
More
Range Queries
Mo
More
Range Queries
Segtree
More
Range Queries
Heavy Light Decomposition
More
Range Queries
Persistent Seg Tree Lazy Prop
More
Searches
Searches
Floyd Cycle Detection Algo
More
Searches
Binary Search
+14
More
Searches
Ternary Search
+5
More
Searches
Median Search
More
Searches
Text Search
More
Searches
Linear Search
+13
More
Searches
Hash Search
More
Searches
Interpolation Search
+5
More
Searches
Saddleback Search
More
Searches
Jump Search
+8
More
Searches
Sublist Search
More
Searches
Exponential Search
More
Searches
Fibonacci Search
+4
More
Searches
Interpolation Search 2
More
Searches
Median Search 2
More
Sorts
Sorts
Topological Sort
+1
More
Sorts
Binary Insertion Sort
+1
More
Sorts
Count Inversions
More
Sorts
Recursive Bubble Sort
More
Sorts
Radix Sort
+8
More
Sorts
Counting Sort
+6
More
Sorts
Wave Sort
More
Sorts
Quick Sort
+18
More
Sorts
Numeric String Sort
More
Sorts
Selection Sort Iterative
More
Sorts
Pigeonhole Sort
+2
More
Sorts
Comb Sort
+7
More
Sorts
Library Sort
More
Sorts
Selection Sort Recursive
More
Sorts
Random Pivot Quick Sort
More
Sorts
Slowsort
More
Sorts
Tim Sort
+1
More
Sorts
Odd Even Sort
More
Sorts
Bead Sort
+2
More
Sorts
Swap Sort
More
Sorts
Heap Sort
+12
More
Sorts
Shell Sort
+8
More
Sorts
Pancake Sort
+5
More
Sorts
Insertion Sort
+17
More
Sorts
Gnome Sort
+7
More
Sorts
Bucket Sort
+4
More
Sorts
Counting Sort String
More
Sorts
Bogo Sort
+5
More
Sorts
Shell Sort 2
More
Sorts
Cocktail Selection Sort
More
Sorts
Bitonic Sort
More
Sorts
Stooge Sort
More
Sorts
Bubble Sort
+18
More
Sorts
Quick Sort 3
More
Sorts
Non Recursive Merge Sort
More
Sorts
Radix Sort 2
More
Sorts
Cycle Sort
+4
More
Sorts
Merge Insertion Sort
More
Sorts
Dnf Sort
More
Sorts
Wiggle Sort
More
Sorts
Strand Sort
More
Strings
Strings
Hamming Distance
+4
More
Strings
Horspool
More
Strings
Rabin Karp
+1
More
Strings
Manacher Algorithm
More
Strings
Knuth Morris Pratt
More
Strings
Brute Force String Searching
More
Strings
Boyer Moore
More
Strings
Z Function
More
© The Algorithms 2023
What is an algorithm?
About us
Programming Languages
Contribute
Donate
GitHub
Gitter
Twitter
Source code
Contact