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 π‘