ai-agent

javascript-algorithms

๐Ÿ“ Algorithms and data structures implemented in JavaScript with explanations and links to further readings
196,652 stars31,009 forksJavaScriptUpdated 7/26/2026100% free ยท open source
What it does

javascript-algorithms provides a collection of JavaScript implementations of various algorithms and data structures, along with explanations and links to further learning resources

When to use it
  • โ€ขWhen you need to implement a specific algorithm or data structure in a JavaScript project
  • โ€ขWhen you want to learn about different algorithms and data structures and how they can be applied in JavaScript
  • โ€ขWhen you need a reference implementation of an algorithm or data structure for testing or comparison purposes
Ready-to-paste prompt
node src/algorithms/sorting/quick-sort.js --array=[3,6,1,8,2,4] --verbose
Heads up: Make sure you have Node.js installed on your system, as the algorithms are implemented in JavaScript and require a JavaScript runtime environment to run
Saves to your device
Use with Claude
New

Skip the builder โ€” one click puts this in Claude, Cursor, Antigravity and more.

๐Ÿ› ๏ธ Technical setup

Expect 20โ€“40 minutes in a terminal โ€” or let your AI agent drive it.

Try it instantly โ€” no install
Claude Code
mkdir -p ~/.claude/skills/javascript-algorithms && curl -fsSL https://workflowstacks.com/api/skills/javascript-algorithms/claude-skill -o ~/.claude/skills/javascript-algorithms/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go โ€” no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How javascript-algorithms works
Codeflow
Free to inspect

Javascript-algorithms is a large JavaScript project (~19k lines across 361 code files). It is a full software project: use it through its install path rather than reading it end to end. Last commit a month ago, MIT license, has a test suite.

Size
Large codebase
~19k lines ยท 361 code files ยท ~3 h to skim
Setup
Developer setup
A real software project. Use it via its install path; don't expect to read it all.
Runs on
Node.js
No API keys detected
JavaScript 100%
Where to start reading
  1. 1
    README.md
    Start here โ€” what it does and how to install it
  2. 2
    package.json
    Dependencies and the commands it exposes
  3. 3
    src/playground/README.md
    Inside src/ โ€” the main logic begins here
What's in each folder
src/Core code โ€” the actual logic644 files
.github/CI / automation (GitHub Actions)1 files
.husky/Folder1 files
assets/Images & static assets1 files
READMEHas testsDocumentedCI checksMIT licenseUpdated this month
Quick Actions
Details
Creator
trekhleb
Language
JavaScript
Category
ai-agent
Published
3/24/2018

Are you the creator of this tool? and earn 85% of every sale.

Show it off in your README:

Featured on WorkflowStacks
[![Featured on WorkflowStacks](https://workflowstacks.com/api/badge/javascript-algorithms.svg)](https://workflowstacks.com/skills/javascript-algorithms?utm_source=github&utm_medium=badge)
๐Ÿ”ฅ Hot this week, in your inbox
Skills like this, every Monday.

The five fastest-growing open-source AI skills, ranked by GitHub star growth. One email a week, unsubscribe anytime.