CS
Algorithms
Problems Base course RU

Found in

version control

Articles

SRT Algorithm Binary search Finds the “no → yes” boundary in ordered data in log₂ n checks. O(log n) 2 problems SRT Algorithm Counting sort and radix sort Without comparisons: count the keys or split them into digits, O(n + k) and O(d·n) instead of n log n. O(n + k) and O(d·(n + b)) 2 problems

Often together

array 2 classic 2 interviews 2 searching 1 binary search 1 sorting 1 stable 1 prefix sums 1 bit tricks 1 trie 1 in production 1

Written by Viacheslav Legostin. Everything is free; readers’ code is not stored.

Computer Science The algorithms catalogue Problems Base course Mathematics legost.in

The algorithms catalogue

Problems

SRT Searching and sorting

  1. Binary search
  2. Binary search on the answer
  3. Exponential search
  4. External sorting
  5. Counting sort and radix sort

DS Data structures

  1. Dynamic array
  2. Cuckoo hashing
  3. Bloom filter
  4. Binary heap
  5. Binary search tree
  6. AVL tree
  7. B-tree
  8. Disjoint set union
  9. Fenwick tree

GRA Graphs

  1. Breadth-first search
  2. Depth-first search
  3. Bridges and articulation points
  4. Dijkstra's algorithm
  5. A*
  6. Bidirectional search
  7. The Bellman–Ford algorithm
  8. Floyd–Warshall algorithm
  9. Contraction hierarchies
  10. Dinic's algorithm
  11. Bipartite matching
  12. Eulerian path
  13. Centroid decomposition

STR Strings and text

  1. The Aho–Corasick algorithm
  2. Boyer–Moore
  3. The Burrows–Wheeler transform
  4. Edit distance
  5. BK-tree

DP Dynamic programming

  1. Dynamic programming
  2. Bitmask DP
  3. Digit DP
  4. Convex hull trick
  5. Knuth and divide-and-conquer optimisations

PAR Paradigms

  1. Backtracking
  2. Branch and bound
  3. Divide and conquer
  4. Closest pair of points

NUM Numbers and algebra

  1. Euclid's algorithm
  2. Fast exponentiation
  3. Chinese remainder theorem
  4. Big integers
  5. Fast Fourier transform

GEO Geometry

  1. Convex hull
  2. Delaunay triangulation and Voronoi diagram

NUM~ Numerical methods

  1. Bisection and Newton's method

SYS Systems and big data

  1. Consistent hashing
  2. Count-Min Sketch
  3. Retry with jitter
  4. CRDT

ML Data and machine learning

  1. k-means
  2. DBSCAN
  3. Decision tree
  4. Perceptron and backpropagation

TEC Techniques

  1. Big O
  2. Fast input and output
  3. How to benchmark honestly
  4. Cache-friendly data
  5. Complexity from measurements
  6. Amortized analysis
  7. Choosing a data structure
  8. Coordinate compression
  9. Bit tricks