Awesome
Collection of algorithms and data structures in C++, Java, Kotlin, Python and Rust
Data structures
- Segment tree c++ java kotlin
- Segment tree without recursion c++ java
- 2d tree c++ java
- Fenwick tree c++ java kotlin rust
- Fenwick tree with extended operations c++ java
- Persistent tree java kotlin rust
- Centroid decomposition c++ java
- Heavy/light decomposition c++ java
- Link/cut tree c++ java
- Link/cut tree for connectivity query java
- Link/cut tree for LCA query java
- Binary heap java
- Binary heap with change priority c++ java
- Disjoint sets c++ java rust
- Treap c++ java kotlin rust
- Treap with indexed key c++ java
- k-d tree for point query c++ java
- k-d tree for rectangular query java
- R-tree java
- Metric tree java
- Quadtree java
- Mergeable heap java rust
- Queue with minimum c++ java
- Sparse table c++ java java
- Sparse segment tree c++
- Wavelet tree c++ java
- Mo's algorithm java
- Mo's algorithm with point updates c++
Graph algorithms
- Shortest paths c++ java
- Maximum flow c++ java
- Maximum matching c++ java
- Spanning tree c++ java
- Connectivity c++ java
- Biconnectivity java
- LCA Schieber-Vishkin algorithm c++ java
- LCA java
- Planarity testing (contribute a link or implementation)
- Dynamic graph connectivity (contribute a link or implementation)
- Chu–Liu/Edmonds' algorithm (contribute a link or implementation)
- Minimum augmentation to strong connectivity (contribute a link or implementation)
- Minimum augmentation to biconnectivity (contribute a link or implementation)
String algorithms
- Knuth-Morris-Pratt algorithm c++ java
- Aho-Corasick algorithm c++ java
- Suffix array and lcp array. Radix sort algorithm in O(n*log(n)) c++ java
- Suffix array. Algorithm DC3 in O(n) c++ java
- Suffix array. Algorithm SA-IS in O(n) c++
- Suffix automaton c++ java
- Suffix tree Ukkonen's algorithm c++ java
- Suffix tree Breslauer-Italiano algorithm c++
- Trie java
- Z-function c++ java
- Hashing c++ java
- Parsing java c++
- Palindrome tree (contribute a link or implementation)
- Sorting strings in linear time (contribute a link or implementation)
Sorting algorithms
Geometry algorithms
- Segments intersection c++ java
- Line operations java
- Circle operations java
- Convex hull c++ java
- Point in polygon query c++ java
- Closest pair of points java
- Furthest pair of points c++
- Implement quaternion (contribute a link or implementation)
Optimization
- Simplex algorithm java
Numerical algorithms
- Fast Fourier transform (FFT) c++ java
- Long arithmetics c++
- Fast subset convolution java
- Fast Walsh-Hadamar transform java
- Karatsuba multiplication java
- Newton interpolation java
- Laguerre's root-finding algorithm c++
Number theory
- Primes and divisors java c++
- Factorization java c++
- Euclidean algorithm java c++
- Primitive root c++
- Discrete logarithm c++
- Discrete root c++
- Multiplicative function java
- Rational numbers java
- Polynom class c++
- Linear recurrence and Berlekamp-Massey algorithm c++
- Modular operations c++
Combinatorics
- Permutations java
- Combinations java
- Arrangements java
- Partitions java
- Set Partitions java
- Bracket sequences java
- Binomial coefficients java
- Prufer code java