Algorithm |
BFS |
Breadth-first graph traversal search
|
|
Algorithm |
DFS |
Depth-first graph traversal search
|
|
Algorithm |
Dijkstra |
Single source, shortest path
|
|
Algorithm |
Fibonacci |
Compute N-th Fibonacci number quickly with matrix exponentiation
|
|
Algorithm |
FizzBuzz |
The classic stupid interview problem
|
|
Algorithm |
GCD and LCM |
Euclid's algorithm
|
|
Algorithm |
Modular Exponentiation |
Compute X to the power N modulo M
|
|
Algorithm |
Prime Factorization |
Compute the prime factors of a non-negative integer N
|
|
Algorithm |
Sieve of Eratosthenes |
Bottom-up determination of primes
|
|
Data Structure |
Range Minimum Query |
With binary-lifting for constant-time queries.
|
|
Data Structure |
Union-Find Disjoint-Set |
With path compression for amortized time complexity
|
|