Collection of algorithms and data structures in C++ and Java
Data structures
- Segment tree c++ java
- Segment tree for sum with lowerBound operation java
- Fenwick tree c++ java
- Fenwick tree with extended operations java
- Persistent tree java
- Centroid decomposition c++ java
- Heavy/light decomposition java
- Link/cut tree java
- Link/cut tree for connectivity query java
- Link/cut tree for LCA query java
- Binary heap java
- Binary heap with change priority java
- Disjoint sets c++ java
- Treap with implicit key java
- Treap as BST 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
- Queue with minimum c++ java
- Sparse table for RMQ java
Graph algorithms
- Shortest paths c++ java
- Maximum flow c++ java
- Maximum matching c++ java
- Maximum weighted matching in general graph (contribute a link or implementation)
- Spanning tree c++ java
- Connectivity c++ java
- Biconnectivity java
- LCA Schieber-Vishkin algorithm cpp 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 cpp java
- Suffix tree Breslauer-Italiano algorithm cpp
- Trie java
- Z-function c++ java
- Hashing java
- Parsing java cpp
- Implement 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
- Long arithmetics c++
- Fast Fourier transform (FFT) c++ java
- 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
- Implement polynom class (contribute a link or implementation)