Skip to content

Latest commit

 

History

History
95 lines (81 loc) · 6.3 KB

README.md

File metadata and controls

95 lines (81 loc) · 6.3 KB

Algorithms and Data structures

Following stuff is already implemented:

Math algorithms

Prime numbers and factorization

  • Sieve of Eratosthenes (wiki)
  • Sieve of Eratosthenes with linear complexity (aka Euler's sieve) (wiki)
  • Pollard's rho algorithm (wiki)

Sorting algorithms

Other algorithms related to sortings

  • Quickselect (selection algorithm) (wiki)
  • Quickselect with O(n) worst-case complexity. Uses Median of medians (wiki)

Heaps

Search Trees

Data Structures for RMQ and similar problems

Algorithms on graphs

Shortest paths

Algorithms and Data structures for trees

Least common ancestor (LCA) and Level ancestor problem (LA)

Algorithms on strings

Other data structures

  • Disjoint set union (Union find) (cp-algorithms)
  • Persistent stack
  • Queue with minimum
  • Hashed array tree (wiki)
  • Dynamic array with Θ(1) push_back complexity (no O(n) worst-case)

Other algorithms

  • Longest increasing subsequence (wiki)
  • Longest common subsequence (wiki)