Skip to content

tknsgk/algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

154 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Implementation of algorithms

C++ and Java implementations.

Algorithms

Category Algorithm Description
DP Knapsack 0-1 knapsack problem
Graph Dijkstra Shortest path (non-negative edges)
Graph Floyd All-pairs shortest path, negative cycle detection
Graph Prim Minimum spanning tree
Math GCD Greatest common divisor
Math LCM Least common multiple
Math Primes Prime factorization, Sieve of Eratosthenes, Sieve of Atkin
Math Combination nCk with modular inverse
Math ModPow Modular exponentiation by repeated squaring
Search BFS Breadth-first search
Search DFS Depth-first search
Search BinarySearch Lower bound / upper bound
Tree SegmentTree Range Minimum Query
Tree UnionFind Union-Find with path compression

Test

# C++
src/cpp/test/<Category>/test_<name>.sh

# Java
src/java/test/<Category>/test_<name>.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •