trekhleb/javascript-algorithms

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

Open original source ↗

From the publisher

README & documentation

Source preview

Read the project’s overview, installation instructions and usage examples. The original README is the source of truth.

[](https://github.com/trekhleb/javascript-algorithms/actions?query=workflow%3ACI+branch%3Amaster) [](https://codecov.io/gh/trekhleb/javascript-algorithms) 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, עברית A data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data. Remember that each data has its own trade-offs. And you need to pay attention more to why you're choosing a certain data structure than to how to implement it. B - Beginner, A - Advanced An…

trekhleb/javascript-algorithms on GitHub A short preview, not the full document.

Read the full README ↗ · Preview checked 2026-10-28T20:33:40.093Z

Inside the original README — Document outline
  1. JavaScript Algorithms and Data Structures
  2. Data Structures
  3. Algorithms
  4. Algorithms by Topic
  5. Algorithms by Paradigm
  6. How to use this repository
  7. Useful Information
  8. References
  9. Big O Notation
  10. Data Structure Operations Complexity
  11. Array Sorting Algorithms Complexity
  12. Author

Headings are captured from the source. Links open the publisher’s document, not a locally hosted copy.

Links from the README

References supplied by the publisher, not independently verified endorsements. Check the destination before downloading files or entering credentials.

Documentation belongs to its respective authors. Reported project/model license: MIT. A listing is not a grant of reuse or training rights. Confirm the document’s own terms at the source.

What this repository does

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

Repository facts

Owner
trekhleb
Primary language
JavaScript
Stars
196,713
Forks
30,997
Open issues + pull requests
434
License
MIT
Archived
No
Default branch
master
Created
2018-03-24T07:47:04.000Z
Last push
2026-07-26T02:43:08.000Z

Topics and intended use

Owner-supplied topics: algorithm, algorithms, computer-science, data-structures, interview, interview-preparation, javascript, javascript-algorithms

Review the README for scope, installation, examples and limitations. We do not run repository code or certify it.

Evaluate before installing

Review licensing and dependencies, inspect recent commits and unresolved issues, and test in an isolated environment before production use. Stars and forks alone cannot answer these questions.

README and project files

Issues and maintenance discussion

Releases and changelog

Source and freshness

Source: GitHub. Metadata observed 2026-11-01T12:17:40.351Z. Daily imports are snapshots, not real-time monitoring.

Popularity and source listings do not establish security, suitability, licensing rights or benchmark performance.

Open original source

Related repositories

affaan-m/ECC

react/react

CyC2018/CS-Notes

DietrichGebert/ponytail

Snailclimb/JavaGuide

airbnb/javascript