# trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

Repository: https://github.com/trekhleb/javascript-algorithms
Canonical: https://ross.abutalabs.com/products/javascript-algorithms
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, algorithms, algorithm, javascript-algorithms, computer-science, interview, data-structures, interview-preparation
Last push: 2026-07-26T02:43:08+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 94, release rhythm 35, longevity 100
- inputs: {"age_days": 3084, "days_push": 38, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 196567, forks 31035 (observed 2026-08-28T04:12:28.418173+00:00)

## What it is
A collection of popular algorithms and data structures implemented in JavaScript, each with explanations and links to further reading. It serves primarily as an educational resource for learning computer science fundamentals and preparing for coding interviews.

## Use cases
- prepare for coding interviews
- learn algorithms and data structures in JavaScript
- study computer science fundamentals with examples
- find reference implementations of sorting, graph, and tree algorithms
- review big-O complexity explanations before an interview

## When to choose
- you want well-documented, readable JavaScript implementations of classic algorithms
- you are preparing for technical interviews and need explanations plus code
- you prefer learning from examples with links to further reading

## When to avoid
- you need production-grade, performance-optimized algorithm libraries
- you want battle-tested data structures for a real application
- you need algorithms in a language other than JavaScript

## Facets
- artifact type: learning-resource
- maturity: stable
- function: developer-tools
- domain: education, programming-languages
- platform: -
- tags: data-structures, interview-preparation, computer-science, educational, javascript, algorithms, nodejs

## Member repositories
- trekhleb/javascript-algorithms (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:12:28.418173+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:10:30.996705+00:00, confidence not recorded.
  - readme: https://github.com/trekhleb/javascript-algorithms (fetched 2026-08-28T04:12:28.418173+00:00, sha b155a07e3670)
- Data as of 2026-08-30T08:39:29.467469+00:00.
