Home - YessineJallouli/Competitive-Programming GitHub Wiki
Welcome to the Competitive-Programming wiki!
Tools for contest :
Stress Test
Squelette
CodeJam HackerCup
Testing Tool For GCJ
Number Theory :
Binomial coefficient O(N) && O(N^2)
Sieve of Eratosthenes
Euler totient function (phi)
Möbius Function
Pollard's rho Factorization
Mathematics :
Graph Theory :
Shortest path : Dijkstra
Shortest path : Bellman Ford
Shortest path : Floyd Warshall
Topological Sort
Strongly Connected Components (SCC) : Kosaraju's algorithm
Krushkal's MST (Minimum Spanning Tree)
Prim's MST (Minimum Spanning Tree)
Rerooting
LCA (Lowest Common Ancestor)
Union Find
Bipartite matching : Hungarian algorithm
Bipartite matching : Kuhn's algorithm
Data Structures
Ordered Statistic Tree (__gnu_pbds)
Segment Tree
2D Segment Tree
Segment Tree Lazy propagation
Ordered Segment Tree
Dynamic Segment Tree
Persistent Dynamic Segment Tree
Fenwick Tree (BIT)
Sparse Table (RMQ)
Trie
0-1 Trie
Algorithms :
Mo's Algorithm
Mo's on tree (Query on Subtree)
Mo's on tree (Query on Path)
Mo's & Update
Heavy Light Decomposition
Centroid Decomposition
Strings :
Prefix function. KMP algorithm
Z-function
Suffix array