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 ๐ก
Topological Sort ๐ก
Dijkstra's Algorithm ๐ก