📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
★ 196,728⑂ 30,973👁 4,175⑃ 897● 385▤ 0
javascriptalgorithmsalgorithmjavascript-algorithmscomputer-scienceinterviewdata-structuresinterview-preparation
More from this author
+2
Daily
+6
Weekly
+49
Monthly
196,728
stars
30,973
forks
4,175
watchers
897
prs
385
issues
0
releases
README
JavaScript Algorithms and Data Structures 🇺🇦 UKRAINE IS BEING ATTACKED BY RUSSIAN ARMY. CIVILIANS ARE GETTING KILLED. RESIDENTIAL AREAS ARE GETTING BOMBED. - Help Ukraine via: - Serhiy Prytula Charity Foundation - Come Back Alive Charity Foundation - National Bank of Ukraine - More info on war.ukraine.ua and MFA of Ukraine !repo size 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_, _עברית_ Data Structures 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 B Linked List B Doubly Linked List B Queue B Stack B Deque - double-ended queue B Hash Table B Heap - max and min heap versions B Priority Queue A Trie A Tree A Binary Search Tree A AVL Tree A Red-Black Tree A Segment Tree - with min/max/sum range queries examples A Fenwick Tree (Binary Indexed Tree) A Graph (both directed and undirected) A Disjoint Set - a union–find data structure or merge–find set A Bloom Filter A LRU Cache - Least Recently Used (LRU) cache Algorithms An algorithm is an unambiguous specification of how to solve a class of problems. It is a set of rules that precisely define a sequence of operations. B - Beginner, A - Advanced Algorithms by Topic Math B Bit Manipulation - set/get/update/clear bits, multiplication/division by two, make negative etc. B Binary Floating Point - binary representation of the floating-point numbers. B Factorial B Fibonacci Number - classic and closed-form versions B Prime Factors - finding prime factors and counting them using Hardy-Ramanujan's theorem B Primality Test (trial division method) B Euclidean Algorithm - calculate the Greatest Common Divisor (GCD) B Least Common Multiple (LCM) B Sieve of Eratosthenes - finding all prime numbers up to any given limit B Is Power of Two - check if the number is power of two (naive and bitwise algorithms) B Pascal's Triangle B Complex Number - complex numbers and basic operations with them B Radian & Degree - radians to degree and backwards conversion B Fast Powering B Horner's method - polynomial evaluation B Matrices - matrices and basic matrix operations (mul
Top issues
#1008Factorial of a negative number does not exist18 comments · 2023-03-17#89Translate to russian13 comments · 2018-07-03#990The "i" of the for loop can be initialized with the value 210 comments · 2023-01-31#568Linear Search Fix10 comments · 2020-10-17#339Cartesian product with an empty set should be an empty set9 comments · 2019-04-15#196Suggestion: ship production ready build to npm9 comments · 2018-09-02#12A* algorithm?9 comments · 2018-05-24#960Eu realmente não entendi7 comments · 2022-11-17
News & coverage (14)
Hacker NewsAlgorithms and Data Structures Explained and Implemented in JavaScript▲ 483 · 43 comments · 2018-05-23Hacker NewsClassic Algorithms Implemented in JavaScript▲ 249 · 34 comments · 2018-07-20Hacker NewsJavaScript-algorithms: Algorithms and data structures implemented in JavaScript▲ 183 · 76 comments · 2023-04-07Hacker NewsJavaScript Algorithms and Data Structures (2018)▲ 115 · 30 comments · 2021-10-20Hacker NewsBinary representation of floating-point numbers▲ 49 · 18 comments · 2021-07-24Hacker NewsJavaScript Algorithms and Data Structures (examples and explanations of each)▲ 48 · 5 comments · 2021-02-02Hacker NewsLots of algorithms and data structures implemented in JavaScript▲ 5 · 0 comments · 2018-05-25Hacker NewsJavaScript Algorithms and Data Structures▲ 3 · 0 comments · 2019-12-13Hostinger15 Most Popular GitHub Repos for Developers in 20262026-09-18analyticsindiamag.comBest GitHub Learning Repositories for Developers2022-03-15