An open API service indexing awesome lists of open source software.

https://github.com/ccwukong/algo-in-js

The common data structures and algorithms implemented in JavaScript.
https://github.com/ccwukong/algo-in-js

algorithms data-structures disjoint-set divide-and-conquer dynamic-programming graph greedy heap javascript linkedlist priority-queue queue searching sorting stack tree

Last synced: 3 months ago
JSON representation

The common data structures and algorithms implemented in JavaScript.

Awesome Lists containing this project

README

          

# Algo-in-JS

## Why another data structure and algorithm repo?

The original idea of creating this repo is for me to refresh my rusty knowledge for common data structures and algorithms.

## What are the data structures and algorithms covered here?

I planned to cover the following data structures with detailed explanations:

- [Disjoint set](https://github.com/ccwukong/Algo-in-JS/blob/main/searching/graph/disjointSet.js)
- Stack & Queue
- Linked list (singly and doubly)
- [Heap](https://github.com/ccwukong/Algo-in-JS/blob/main/sorting/heapSort.js) & [Priority queue](https://github.com/ccwukong/Algo-in-JS/blob/main/priorityqueue/priorityQueue.js)
- Hash table
- Binary tree, Binary search tree, N-ary tree & [Trie](https://github.com/ccwukong/Algo-in-JS/blob/main/tree/trie.js)
- Graph (DAG, MST, [Cyclic check](https://github.com/ccwukong/Algo-in-JS/blob/main/searching/graph/hasCycle.js))

And the most common algorithms:

- Recursion
- [Merge sort](https://github.com/ccwukong/Algo-in-JS/blob/main/sorting/heapSort.js), [Quick sort](https://github.com/ccwukong/Algo-in-JS/blob/main/sorting/quickSort.js), [Heap sort](https://github.com/ccwukong/Algo-in-JS/blob/main/sorting/heapSort.js) & [Topological sort](https://github.com/ccwukong/Algo-in-JS/blob/main/sorting/topologicalSort.js)
- DFS & BFS in Graphs/Matrix, including Backtracking
- Divide & Conquer
- Hashing
- [Dijkstra](https://github.com/ccwukong/Algo-in-JS/blob/main/searching/graph/dijkstra.js) (I highly recommend this [YouTube video](https://www.youtube.com/watch?v=pVfj6mxhdMw&t=4s))
- KMP
- Greedy
- Dynamic Programming (DP table & Memoization)