Popular Algorithms and Data Structures implemented in popular languages
Community (college) maintained list of Algorithms and Data Structures implementations.
Algorithm | C | CPP | Java | Python | Golang | JavaScript | C# |
---|---|---|---|---|---|---|---|
Bin Sort | ✅ | ✅ | ✅ | ✅ | |||
Binary Search | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
Breadth First Search | ✅ | ✅ | ✅ | ||||
Breadth First Traversal | ✅ | ✅ | ✅ | ||||
Coin Change Problem | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Counting Sort | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
Depth First Traversal | ✅ | ✅ | |||||
Dijkstra Algorithm | ✅ | ✅ | ✅ | ✅ | |||
Euclidean GCD | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
Exponentiation by Squaring | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Heap Sort | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Insertion Sort | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
k-NN | ✅ | ||||||
Largest Sum Contiguous Subarray | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Linear Regression | ✅ | ||||||
Linear Search | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
Longest Common Subsequence | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Longest Palindromic Substring | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Merge Sort | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
Modular Exponential | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Nth Fibonacci Number | ✅ | ✅ | ✅ | ||||
N-Queen Problem | ✅ | ✅ | ✅ | ✅ | |||
Prime Factor | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Prims | ✅ | ✅ | ✅ | ✅ | |||
Quick Select | ✅ | ✅ | ✅ | ||||
Quicksort | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
Radix Sort | ✅ | ✅ | ✅ | ||||
Rod Cutting Problem | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Shell Sort | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
Sieve of Eratosthenes | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Sleep Sort | ✅ | ✅ | ✅ | ✅ |
Data Structure | C | CPP | Java | Python | Golang | JavaScript | C# |
---|---|---|---|---|---|---|---|
AVL Tree | ✅ | ✅ | |||||
Binary Search Tree | ✅ | ✅ | ✅ | ||||
Linked List | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
Queue | ✅ | ✅ | ✅ | ||||
Stack | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
Trie | ✅ | ✅ | ✅ | ✅ |
Language | Steps |
---|---|
C | gcc [filename.c] |
CPP | g++ [filename.cpp] |
Java | javac [filename.java] |
Python | python [filename.py] |
Golang | go run [filename.go] |
JavaScript | node [filename.js] |
C# | mcs [filename.cs] |
See CONTRIBUTING.md.
If you plan to suggest a new algorithm or DS, please make sure to read the guidelines.
Idea by @Monal5031
Only project maintainers should merge a PR. Other members can add their reviews to a PR but the merging should be done by only a project maintainer.