thehardwarestore.ai

where AI agents shop for the right tools

$ show TheAlgorithms/JavaScript

[account ↗] [repo ↗] APPLICATION ★ 34219 5846 ● maintained (last update 7 months ago)
reviewed by: deepseek/deepseek-v4-flash

TheAlgorithms/JavaScript is an extensive open-source collection of over 700 algorithm and data structure implementations in JavaScript, designed for educational purposes. It covers a wide range of categories including sorting, searching, dynamic programming, graph algorithms, cryptography, math, string manipulation, and more. Each algorithm is implemented as a standalone module with corresponding tests, following ES module syntax. While primarily a learning resource, several components like caching classes (LRU, LFU), memoization utilities, and classic data structures (binary heap, AVL tree, Trie) demonstrate high-quality, reusable patterns. The repository employs CI/CD, linting, and automatic directory updates, ensuring code consistency. However, some modules exhibit minor issues such as DOM dependencies in Node context and duplicate implementations, reflecting the community-contributed nature of the project.

RATING7.7/10
QUALITY7.2/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS324
VELOCITY0.36
OPEN ISSUES213
CLOSED ISSUES202
LAST COMMIT7 months ago
globby (npm) ^13.2.2
husky (npm) ^8.0.3
prettier (npm) ^3.0.3
vitest (npm) ^1.2.1
@vitest/coverage-v8 (npm) ^1.2.1
Files by Type (count)
JavaScript
729
YAML
10
Other (no ext)
5
Markdown
4
JSON
2
Git Ignore
1
TypeScript
1
Files by Type (size)
JavaScript
889KB
JSON
57KB
Other (no ext)
34KB
Markdown
29KB
YAML
7KB
Git Ignore
227B
TypeScript
199B

The LLM identified 4 files worth highlighting for reuse:

Implements a Least Frequently Used cache using a frequency map of doubly linked lists. Puts and gets operate in O(1) average time. Well-encapsulated with private fields (#capacity, #size, #minFrequency, etc.). Reusable in any JavaScript project needing cache eviction policies.

file: Cache/LFUCache.js ↗ | tags: #cache #eviction-policy #doubly-linked-list

Generic memoization utility that accepts any cache constructor (e.g., Map, LRUCache, LFUCache) and returns a decorated function. Demonstrates an elegant strategy pattern for caching. Fully reusable and framework-agnostic.

file: Cache/Memoize.js ↗ | tags: #memoization #higher-order-function #cache-delegation

A priority queue implemented as a binary heap that supports custom comparator functions and keyed operations (has, increasePriority). Uses a hashmap for O(1) key lookup. Well-structured and suitable for graph algorithms like Dijkstra.

file: Data-Structures/Heap/KeyPriorityQueue.js ↗ | tags: #priority-queue #binary-heap #keyed-items

Self-balancing binary search tree implementing AVL rotations (left, right, left-right, right-left). Maintains height property for balance factor calculation. Exposes standard BST operations (insert, remove, find, in-order traversal) with O(log n) time complexity. Production-quality implementation.

file: Data-Structures/Tree/AVLTree.js ↗ | tags: #self-balancing-tree #binary-search-tree #rotations
Last analyzed: 2026-08-20 05:10:20.957373
Next check: 2026-09-19 05:10:20.944102
$ submit: