This is a collection of data structures and algorithms implemented in JavaScript (mainly), Python, and Rust. The Python and Rust versions are a work in progress, and only exist for the core sorting and searching algorithms. Everything has at least a JavaScript version.
Why write these all from scratch, especially when there are many implementations written across the internet? I did this mainly to gain a deeper understanding of how each works and for practice.
🟡 => JavaScript
🔵 => Python
🟠 => Rust
Stack 🟡
Queue 🟡
Priority Queue 🟡
Singly Linked List 🟡
Doubly Linked List 🟡
Hash Table 🟡
Binary Search Tree (BST) 🟡
Binary Heap 🟡
Trie (Prefix Tree) 🟡
Graph 🟡
Adjacency List 🟡
Selection Sort 🟡🔵🟠
Bubble Sort 🟡🔵🟠
Insertion Sort 🟡🔵🟠
Merge Sort 🟡🔵🟠
Quicksort 🟡🔵🟠
Radix Sort 🟡
Linear Search 🟡🔵🟠
Binary Search 🟡🔵🟠
Breadth First Search (BFS) 🟡
Depth First Search (DFS) 🟡
Top K Elements 🟡