gitmyhub

javascript-algorithms

JavaScript ★ 196k updated 9d ago

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

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.

JavaScriptsetup: easycomplexity 2/5

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.

Where it fits