trekhleb/javascript-algorithms
JS algorithms + data structures with explanations
What
Algorithms and data structures in JavaScript, each with its own README explaining the idea and linking further reading.
What's inside: data structures (linked list, heap, trie, graph...), algorithms by topic (math, sets, strings, search, sorting, trees, graphs, crypto, ML), and by paradigm (greedy, DP, backtracking).
Reach for it when
learning or reviewing an algorithm for interviews in JS.