Explore Algorithms
Discover our comprehensive collection of interactive algorithm visualizations. Each algorithm includes step-by-step animations, multiple language implementations, and real-world applications.
0/1 Knapsack
Solves the 0/1 Knapsack problem using dynamic programming.
O(nW)O(nW)Bellman-Ford Algorithm
Finds shortest paths from a single source vertex to all other vertices in a weighted digraph. Can detect negative-weight cycles.
O(VE)O(V)Binary Search
An efficient algorithm for finding an item from a sorted list.
O(log n)O(1)Binary Search Tree Deletion
An algorithm to remove nodes from a Binary Search Tree while maintaining the BST property. Handles three cases: deleting leaf nodes, nodes with one child, and nodes with two children.
O(log n) average, O(n) worst caseO(log n) average, O(n) worst caseBinary Search Tree Insertion
An algorithm to insert new nodes into a Binary Search Tree while maintaining the BST property that left subtree values are less than root and right subtree values are greater than root.
O(log n) average, O(n) worst caseO(log n) average, O(n) worst caseBreadth-First Search
A graph traversal algorithm that explores vertices level by level.
O(V + E)O(V)Bubble Sort
A simple comparison-based sorting algorithm that repeatedly steps through the list.
O(n^2)O(1)Coin Change Problem
Finds the minimum number of coins needed to make a given amount using dynamic programming.
O(n × amount)O(amount)Counting Sort
A non-comparison sorting algorithm for integers with a known range.
O(n + k)O(k)Depth-First Search
A graph traversal algorithm that explores as far as possible along each branch.
O(V + E)O(V)Dijkstra's Algorithm
Finds shortest paths from a source vertex to all vertices in a weighted graph.
O((V + E) log V)O(V)Edit Distance
Computes the minimum number of operations required to convert one string into another.
O(mn)O(mn)Fibonacci (DP)
Computes Fibonacci numbers using memoization or bottom-up DP.
O(n)O(n)Floyd-Warshall
A dynamic programming algorithm for finding shortest paths in a weighted graph.
O(n^3)O(n^2)Greatest Common Divisor
Finds the greatest common divisor of two integers using Euclid's algorithm.
O(log min(a, b))O(1)Heap Sort
A comparison-based sorting algorithm that uses a binary heap data structure.
O(n log n)O(1)Inorder Traversal
Traverses a binary tree in inorder (left, root, right).
O(n)O(h)Insertion Sort
A simple sorting algorithm that builds the final sorted array one item at a time.
O(n^2)O(1)KMP (Knuth-Morris-Pratt) String Matching
An efficient string matching algorithm that finds occurrences of a pattern within a text string using preprocessing to avoid redundant comparisons.
O(n + m)O(m)Kruskal's Algorithm
Finds the minimum spanning tree of a graph using a greedy approach.
O(E log V)O(V)Linear Search
Checks each element one by one until the desired element is found or list ends.
O(n)O(1)Longest Common Subsequence
Finds the length of the longest subsequence present in both given sequences.
O(mn)O(mn)Merge Sort
A stable divide-and-conquer sorting algorithm.
O(n log n)O(n)N Queens
Places N queens on an N×N chessboard such that no two queens threaten each other.
O(N!)O(N)Palindrome Check
Checks if a string is a palindrome.
O(n)O(1)Postorder Traversal
Traverses a binary tree in postorder (left, right, root).
O(n)O(h)Preorder Traversal
Traverses a binary tree in preorder (root, left, right).
O(n)O(h)Prim's Algorithm
Finds the minimum spanning tree of a graph using a priority queue.
O(E log V)O(V)Prime Factorization
An algorithm that decomposes a number into its prime factors - the set of prime numbers that multiply together to give the original number.
O(√n)O(log n)Quick Sort
An efficient divide-and-conquer sorting algorithm.
O(n log n)O(log n)Radix Sort
A non-comparison sorting algorithm for integers that processes digits.
O(nk)O(n + k)Reverse Linked List
Reverses a singly linked list.
O(n)O(1)Selection Sort
A simple sorting algorithm that repeatedly selects the minimum element.
O(n^2)O(1)Subset Sum
Determines if there is a subset of the given set with a sum equal to a given number.
O(2^n)O(n)Sudoku Solver (Backtracking)
A backtracking algorithm that solves Sudoku puzzles by trying possible numbers in empty cells and backtracking when constraints are violated.
O(9^(n*n)) worst caseO(n*n)Topological Sort
Orders vertices of a DAG such that for every directed edge u → v, u comes before v.
O(V + E)O(V)Trie
A tree-like data structure for storing strings, used for efficient retrieval.
O(L)O(NL)Union-Find (Disjoint Set)
Efficiently tracks a set of elements partitioned into disjoint subsets.
O(α(n))O(n)Ready to Dive Deeper?
Each algorithm comes with detailed explanations, multiple programming language implementations, and real-world applications. Check out our documentation for comprehensive learning resources.