Recently I picked it back up, converted everything to TypeScript, and used AI (Zenflow [1] + Claude Opus 4.6) to complete the remaining chapters. I provided the structure, direction, and initial chapters; the AI generated the bulk of the remaining content under a spec-driven workflow.
The book covers roughly a first 1-2 year CS curriculum: sorting, dynamic programming, graph algorithms, trees, heaps, hash tables, and more. All code is executable, typed with generics/interfaces, and covered with tests.
I've thoroughly reviewed several chapters (sorting, DP, graphs) and done a high-level pass on the rest. Currently in beta — corrections and contributions are welcome.
MIT licensed. Inspired by Wirth's "Algorithms and Data Structures", SICP, and CLRS.
Code and tests: https://github.com/amoilanen/Algorithms-with-Typescript
BloodAndCode•24m ago
jsontwikkeling•2m ago
Type signatures document contracts directly:
Clear that it takes two strings and returns match positions. No separate explanation needed.Interfaces model return types and ADTs cleanly:
It's also lightweight, flexible, has familiar C-like syntax, and unlike pseudocode — you can actually run everything.Re: generics feeling awkward — in TypeScript they feel pretty natural. The type inference helps a lot, you rarely need to spell out type parameters at call sites.