git404hub

what is javascript-algorithms fr?

trekhleb/javascript-algorithms — explained in plain English

Analysis updated 2026-06-20

195,932JavaScriptAudience · developerComplexity · 2/5Setup · easy

tl;dr

A JavaScript reference collection of classic algorithms and data structures, linked lists, graphs, dynamic programming, string matching, and more, each with its own explanation and links to videos and further reading.

vibe map

mindmap
  root((javascript-algorithms))
    Data Structures
      Linked lists
      Trees and heaps
      Graphs
      Hash tables
    Algorithms
      Sorting
      Searching
      Dynamic programming
      String matching
    Math
      Fibonacci and primes
      Bit manipulation
      Fourier transform
    Use cases
      Interview prep
      Learning reference
      Starter code

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Study a JavaScript implementation of a specific data structure like a binary search tree or heap before a coding interview.

VIBE 2

Copy a working reference implementation of an algorithm like Levenshtein distance or Dijkstra's into a project as a starting point.

VIBE 3

Practice coding interview topics by reading beginner and advanced examples alongside their plain-English explanations.

VIBE 4

Learn how classic algorithms like Fourier transform or Euclidean GCD are implemented in a modern language.

what's the stack?

JavaScript

how it stacks up fr

trekhleb/javascript-algorithmsaffaan-m/eccaffaan-m/everything-claude-code
Stars195,932197,268174,582
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasymoderate
Complexity2/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

in plain english

This repository contains JavaScript implementations of many popular algorithms and data structures, each paired with its own explanation and links to further reading, including YouTube videos. The README describes the project as "JavaScript based examples of many popular algorithms and data structures," and the topics include algorithm, computer-science, interview, and interview-preparation, which signal that one common use is preparing for technical interviews. The way it works is that the code is organized into two top-level sections, Data Structures and Algorithms, and each item lives in its own subdirectory with its own README. Items are tagged either Beginner or Advanced so a reader can pick what is appropriate. The data structures listed include linked lists, queues, stacks, hash tables, heaps, priority queues, tries, several kinds of trees (binary search, AVL, red-black, segment, Fenwick), graphs, a disjoint set, a bloom filter, and an LRU cache. The algorithms are grouped by topic, Math (bit manipulation, factorial, Fibonacci, primes, Euclidean algorithm, sieve of Eratosthenes, discrete Fourier transform), Sets (Cartesian product, shuffle, power set, permutations, combinations, knapsack), Strings (palindrome, Levenshtein distance, KMP, Z, Rabin, Karp), Searches, and more. Someone would use this when learning data structures and algorithms in JavaScript, preparing for coding interviews, or wanting a worked reference implementation. The README is available in many languages, including Chinese, Korean, Japanese, Polish, French, Spanish, Portuguese, and Russian among others.

prompts (copy fr)

prompt 1
Walk me through the javascript-algorithms implementation of Dijkstra's shortest path. Explain each step in plain English.
prompt 2
I'm preparing for a coding interview. Explain the Knapsack problem solution in the trekhleb/javascript-algorithms repo and describe the dynamic programming approach.
prompt 3
Implement a Trie data structure in JavaScript following the style and conventions used in the javascript-algorithms repo.
prompt 4
Compare the KMP and Rabin-Karp string search algorithms using the implementations in javascript-algorithms. When would I choose each one?
prompt 5
I'm studying AVL trees. Explain the rotation logic in the javascript-algorithms AVL tree implementation in simple terms.

Frequently asked questions

what is javascript-algorithms fr?

A JavaScript reference collection of classic algorithms and data structures, linked lists, graphs, dynamic programming, string matching, and more, each with its own explanation and links to videos and further reading.

What language is javascript-algorithms written in?

Mainly JavaScript. The stack also includes JavaScript.

How hard is javascript-algorithms to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is javascript-algorithms for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.