Skip to content

Latest commit

 

History

History
592 lines (574 loc) · 40.6 KB

README.md

File metadata and controls

592 lines (574 loc) · 40.6 KB

Data structures and algorithms library.


Repository with implementations and explanations of the following data structures and algorithms used in competitive programming.

Searching:

Sorting:

Basic Data Structures:

Graphs:

Fundamentals:

Advanced:

  • Shortest Path Faster Algorithm (SPFA)
  • Strongly connected components (Koraraju)
  • Boolean 2 satisfiability (2-SAT)
  • K-th ancestor
  • Lowest common ancestor (LCA)
  • Max flow (Dinic)
  • Max flow (MPM)
  • Min cost max flow (assignment problem)
  • Virtual tree
  • A*

String matching:

  • Rolling hash
  • Rabin Karp
  • Trie (Prefix Tree)
  • Knuth Morris Pratt (KMP)
  • Aho corasick (KMP Generalization)
  • Suffix array
  • Hash segment tree

Range Query:

  • Sqrt decomposition
  • Sparse table
  • 2D Sparse table
  • Fenwick tree (BITree)
  • Segment tree
  • 2D Segment Tree
  • Merge sort segment tree
  • Implicit treap

Persistance:

  • Persitent array
  • Persistent segment tree

Math:

  • Fast pow
  • Matrix fast pow
  • Sieve of Eratosthenes
  • Fast Fourier transform

Geometry:

  • Convex hull (Graham Scan)
  • KD tree