finds.dev← search

// the find

mgechev/javascript-algorithms

★ 7,828 · JavaScript · MIT · updated Apr 2024

💻 JavaScript implementations of computer science algorithms

A JavaScript implementation of classic CS algorithms and data structures — sorting, graph traversal, trees, compression, combinatorics. It's a study reference, not a production library. Aimed at developers who want to read working code alongside a textbook rather than just theory.

Each algorithm is in its own file with a matching spec file, so you can read implementation and test side by side without untangling a monorepo. The breadth is real — red-black trees, splay trees, interval trees, Bellman-Ford, LZW, Burrows-Wheeler — this isn't just sorting algorithms with a fancy README. Generated API docs via JSDoc mean you can browse the full interface without reading source. Test coverage is consistent across the data structures that matter most.

Last commit is April 2024 and the toolchain (Gulp, JSHint, Travis CI) is vintage 2017 — nobody is maintaining this actively. The implementations use ES5-era patterns; no TypeScript, no ESM exports, nothing you'd actually import into a modern project. Coverage has gaps: the LZW compression has no spec file, the suffix tree has no tests at all. And the README is mostly a contributor grid — there's no explanation of which algorithms are included or how they're organized, so you have to browse the directory tree to find what you want.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →