The Archive of Interesting Code
algorithmsdata-structuresreferencecode-archive
Abstraction: Curated reference implementations of classic CS algorithms and data structures
Key points:
- Maintained by Keith Schwarz; covers sorting (mergesort, heapsort, introsort, smoothsort, radix sort), graph algorithms (Dijkstra, Floyd-Warshall, Bellman-Ford, Ford-Fulkerson, Kosaraju), and advanced data structures (Fibonacci heap, van Emde Boas tree, treap, skip list, cuckoo hash).
- Implementations span C++, Java, Python, Haskell, and Scheme, with Wikipedia-linked explanations for each.
- Includes less-common algorithms such as the alias method for discrete sampling, median-of-medians linear selection, and suffix-array construction (DC3, Manber-Myers).
- Covers string algorithms (KMP, Rabin-Karp, Levenshtein, Needleman-Wunsch) and combinatorial utilities (permutation generators, factoradic numbering, binary cyclic subsets).
- Archive spans 2010–2018; each entry links directly to the source code directory.
Connections: Keith Schwarz · Algorithms · Data Structures