trekhleb

    trekhleb/javascript-algorithms

    #228 this week

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

    education
    algorithm
    algorithms
    computer-science
    data-structures
    interview
    JavaScript
    MIT
    196.7K stars
    31.0K forks
    196.7K GitHub watchers
    Updated Oct 9, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    Ranks #228 of 2,841 repositories GStars tracks this week (top 8%).

    The project lists 211 contributors on GitHub.

    Peaked at #35 in the weekly ranking the week of Dec 7, its best in the past year.

    Use Cases & Benefits

    • Provides JavaScript implementations of popular algorithms and data structures with detailed explanations and further reading links.
    • Offers a comprehensive, well-documented collection that supports learning and research with beginner to advanced level examples.
    • Use for preparing and practicing coding interviews with clear algorithm and data structure examples in JavaScript.
    • Use for educational purposes to understand algorithm paradigms like dynamic programming, greedy, and backtracking through code.
    • Use for experimenting and testing algorithmic concepts in JavaScript via the included playground and test suites.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    MIT

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present
    • Contributing guide: present
    • Code of conduct: present

    Watch-outs

    • No GitHub releases; pin a commit or tag instead of a release.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    🇺🇦 UKRAINE IS BEING ATTACKED BY RUSSIAN ARMY. CIVILIANS ARE GETTING KILLED. RESIDENTIAL AREAS ARE GETTING BOMBED.

    This repository contains JavaScript based examples of many popular algorithms and data structures.

    Each algorithm and data structure has its own separate README with related explanations and links for further reading (including ones to YouTube videos).

    Read this in other languages: 简体中文, 繁體中文, 한국어, 日本語, Polski, Français, Español, Português, Русский, Türkçe, Italiano, Bahasa Indonesia, Українська, Arabic, Tiếng Việt, Deutsch, Uzbek, עברית

    ☝ Note that this project is meant to be used for learning and researching purposes only, and it is not meant to be used for production.

    Excerpt from the trekhleb/javascript-algorithms README on GitHub (MIT license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Jul 15: +2Aug 13: +9Aug 16: +6Aug 17: +27Aug 18: +18Aug 19: +13Aug 20: -3

    +419 stars over 87 days across 15 snapshot days; best day +27 on Aug 17.

    Forks

    31.0K-39

    Open issues

    411+9

    Compared with peers in Education

    Fastest-growing repositories GStars tracks in this cohort for the week of Oct 4, by 7-day star growth

    trekhleb/javascript-algorithms compared with Education repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    rohitg00/ai-engineering-from-scratch68.7K+3.5K753 days ago
    byoungd/up68.6K+1.3K35—
    mnfst/awesome-free-llm-apis10.1K+65014—
    CarterPerez-dev/Cybersecurity-Projects7.9K+44375—
    cs341-illinois/coursebook3.7K+2975—
    trekhleb/javascript-algorithms196.7K+075—
    Category median10.1K+65075—

    Discover Repositories

    Search across tracked repositories by name or description