Collection of algorithms and data structures in Java and C++ (for different languages see codelibrary-sandbox)
- Segment tree
- Segment tree for sum with lowerBound operation
- Segment tree without recursion
- Fenwick tree
- Fenwick tree with extended operations
- Persistent tree
- Centroid decomposition
- Heavy/light decomposition
- Link/cut tree
- Link/cut tree for connectivity query
- Link/cut tree for LCA query
- Binary heap
- Binary heap with change priority
- Disjoint sets
- Treap with implicit key
- Treap as BST
- k-d tree for point query
- k-d tree for rectangular query
- R-tree
- Metric tree
- Quadtree
- Mergeable heap
- Queue with minimum
- Sparse table for RMQ
- Shortest paths
- Maximum flow
- Maximum matching
- Maximum weighted matching in general graph (contribute a link or implementation)
- Spanning tree
- Connectivity
- Biconnectivity
- LCA
- 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)
- Knuth-Morris-Pratt algorithm
- Aho-Corasick algorithm
- Suffix array. Radix sort algorithm in O(n*log(n))
- Suffix array. Algorithm DC3 in O(n)
- suffix automata
- Suffix tree
- Trie
- Z-function
- Hashing
- Parsing
- Implement palindrome tree (contribute a link or implementation)
- Sorting strings in linear time (contribute a link or implementation)
- Segments intesection
- Line operations
- Circle operations
- Convex hull
- Point in polygon query
- Closest pair of points
- Furthest pair of points
- Implement quaternion (contribute a link or implementation)
- Long arithmetics
- Fast Fourier transform
- Karatsuba multiplication
- Newton interpolation
- Laguerre's root-finding algorithm