Skip to content

Algorithms

A comprehensive collection of algorithms implemented in 11 programming languages with interactive visualizations.

247 algorithms | 2550 implementations | 11 languages

Languages

Python | Java | C++ | C | Go | TypeScript | Kotlin | Rust | Swift | Scala | C#

Algorithms

Sorting

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Bitonic Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Bogo Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Bubble Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Bucket Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Cocktail Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Comb Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Counting Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Cycle Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Gnome Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Heap Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Insertion Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Merge Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Pancake Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Partial Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Pigeonhole Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Postman Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Quick Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Radix Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Selection Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Shell Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Strand Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Tim Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Tree Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Searching

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Best-First Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Binary Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Exponential Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Fibonacci Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Interpolation Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Jump Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Linear Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Modified Binary Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Quick Select ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Ternary Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Graph

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
2-SAT ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Bidirectional A* ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
A* Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
All-Pairs Shortest Path ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Articulation Points (Cut Vertices) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Bellman-Ford Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Bidirectional BFS ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Bipartite Check ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Bipartite Matching (Hopcroft-Karp) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Breadth-First Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Bridges (Cut Edges) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Centroid Tree (Centroid Decomposition) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Chromatic Number ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Connected Component Labeling ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Counting Triangles ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Floyd's Cycle Detection ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Depth-First Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Dijkstra's Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Dinic's Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Edmonds-Karp Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Eulerian Path/Circuit ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Flood Fill ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Floyd-Warshall Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Ford-Fulkerson ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Graph Coloring ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Graph Cycle Detection (DFS Coloring) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Hamiltonian Path ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Hungarian Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Johnson's Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Kosaraju's Strongly Connected Components ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Kruskal's Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Longest Path ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Max Flow (Edmonds-Karp) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Maximum Bipartite Matching (Kuhn's Algorithm) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Minimum Cut (Stoer-Wagner) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Minimum Spanning Arborescence (Edmonds/Chu-Liu) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Minimum Spanning Tree (Boruvka) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Minimum Cost Maximum Flow ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Planarity Testing (Euler's Formula) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Prim's Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Prim's MST (Priority Queue) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Shortest Path in DAG ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
SPFA (Shortest Path Faster Algorithm) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Strongly Connected Condensation ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Strongly Connected Components ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Path-Based SCC Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Tarjan's Strongly Connected Components ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Topological Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
All Topological Orderings ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Kahn's Topological Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Parallel Topological Sort ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Dynamic Programming

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Bitmask DP ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Coin Change ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Convex Hull Trick ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Digit DP ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
DP on Trees ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Dungeon Game ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Max 1D Range Sum ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Edit Distance ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Egg Drop Problem ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Fibonacci ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Kadane's Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Knapsack (0/1) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Knuth's Optimization ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Longest Bitonic Subsequence ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Longest Common Subsequence ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Longest Common Substring ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Longest Increasing Subsequence ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Longest Palindromic Subsequence ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Longest Subset with Zero Sum ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Matrix Chain Multiplication ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Optimal Binary Search Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Palindrome Partitioning ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Partition Problem ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Rod Cutting Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Sequence Alignment ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Sum over Subsets DP ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Travelling Salesman Problem ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Wildcard Matching ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Word Break ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Trees

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
AVL Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
B-Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
2D Binary Indexed Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Binary Search Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Binary Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Centroid Decomposition ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Fenwick Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Heavy-Light Decomposition ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Interval Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
KD-Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Lowest Common Ancestor ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Merge Sort Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Persistent Segment Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Prufer Code ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Range Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Red-Black Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Segment Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Segment Tree with Lazy Propagation ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Splay Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Tarjan's Offline LCA ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Treap ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Tree Diameter ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Tree Traversals ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Trie ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Strings

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Aho-Corasick ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Bitap Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Boyer-Moore Search ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Knuth-Morris-Pratt ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Levenshtein Distance ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Longest Palindromic Substring ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
LZ77 Compression ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Manacher's Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Rabin-Karp ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Robin-Karp Rolling Hash ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Run-Length Encoding ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
String to Token ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Suffix Array ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Suffix Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Z-Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Math

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Binary GCD ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Borwein's Algorithm ✅ ✅ ✅
Catalan Numbers ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Chinese Remainder Theorem ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Combination ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Conjugate Gradient ✅ ✅
Discrete Logarithm (Baby-step Giant-step) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Doomsday Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Euler's Totient Function ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Euler Totient Sieve ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Extended Euclidean ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Extended GCD Applications ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Factorial ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Fast Fourier Transform ✅ ✅ ✅ ✅ ✅
Fisher-Yates Shuffle ✅ ✅ ✅ ✅ ✅ ✅
Gaussian Elimination ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Genetic Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Greatest Common Divisor ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Histogram Equalization ✅
Inverse Fast Fourier Transform ✅
Josephus Problem ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Lucas' Theorem ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Luhn Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Matrix Determinant ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Matrix Exponentiation ✅
Miller-Rabin Primality Test ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Mobius Function ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Modular Exponentiation ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Newton's Method (Integer Square Root) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Number Theoretic Transform (NTT) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Pollard's Rho ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Primality Tests ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Prime Check ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Reservoir Sampling ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Segmented Sieve ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Sieve of Eratosthenes ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Simulated Annealing ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Sumset ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Swap Two Variables ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Vegas Algorithm ✅

Greedy

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Activity Selection ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Elevator Algorithm ✅
Fractional Knapsack ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Huffman Coding ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Interval Scheduling Maximization ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Job Scheduling ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Leaky Bucket ✅

Backtracking

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Minimax with Alpha-Beta Pruning ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Minimax ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
N-Queens ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Permutations ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Rat in a Maze ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Subset Sum ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Sudoku Solver ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Divide and Conquer

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Counting Inversions ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Karatsuba Multiplication ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Maximum Subarray (Divide and Conquer) ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Strassen's Matrix Multiplication ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Bit Manipulation

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Bit Reversal ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Count Set Bits ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Hamming Distance ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Power of Two Check ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Unary Coding ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
XOR Swap ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Geometry

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Closest Pair of Points ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Convex Hull ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Convex Hull - Jarvis March ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Delaunay Triangulation ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Line Segment Intersection ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Point in Polygon ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Voronoi Diagram ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Cryptography

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Simplified AES ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Diffie-Hellman Key Exchange ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Pearson Hashing ✅
RSA Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Data Structures

Algorithm Python Java C++ C Go TypeScript Kotlin Rust Swift Scala C#
Bloom Filter ✅
Cuckoo Hashing ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Disjoint Sparse Table ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Fibonacci Heap ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Hash Table ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Binary Heap ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Infix to Postfix ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Linked List Operations ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
LRU Cache ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Mo's Algorithm ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Persistent Data Structures ✅
Priority Queue ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Queue ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Rope Data Structure ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Skip List ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Sparse Table ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Sqrt Decomposition ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Stack ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
Union-Find ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
van Emde Boas Tree ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

Contributing

See CONTRIBUTING.md for guidelines on adding new algorithms.

License

Apache 2.0

Releases

Packages

Used by

Contributors

Languages