/algorithm

Algorithm and Data Structure (C++)

Primary LanguageC++

Algorithm and Data Structure (C++)

Usage

Each cpp file is only dependent on common.h, so you can simply use the shell script to run:

sh run.sh file_name.cpp

Algorithm

  • Quick Sort
  • Fast Partition
  • Binary Search
  • Merge Sort
  • Radix Sort
  • KMP Algorithm
  • Big Interger Mutiplication
  • Extended Euclidean
  • Sieve of Eratosthenes
  • Miller-Rabbin Test
  • Sparse Table Algorithm
  • Graham-Scan Algorithm

Tree and Graph Algorithm

  • Tree Traversal
  • Dijkstra Algorithm
  • Floyd Algorithm
  • Shortest Path Faster Algorithm
  • Prim Algorithm
  • Kruskal Algorithm
  • Topological Sort
  • Dinic Algorithm
  • Minimum Cost Flow
  • Hungarian Algorithm
  • Least Common Ancestors
  • Tarjan Algorithm

Data Structure

  • Heap
  • Treap
  • Binary Indexed Tree
  • Segment Tree
  • Trie Graph
  • Union-Find Set
  • Suffix Array
  • KD Tree