![PRs Welcome](https://camo.githubusercontent.com/91dd7f00641477630e6a2c46baeba2e1bf20b98d0257f55ce4ba06dcb5f7c6d2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e7376673f7374796c653d666c6174)
![GitHub watchers](https://camo.githubusercontent.com/00735e7710598486d72e932d426b9405e21518295fee803ba0a9b88d1f651d3f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f464f53532d554353432f464f5353414c474f2e7376673f7374796c653d736f6369616c266c6162656c3d5761746368266d61784167653d32353932303030)
![All Contributors](https://camo.githubusercontent.com/1d6536e2df332bf6988b32c0c69dc21d82e555d88c0a849aeef7552830cbc9c0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f616c6c5f636f6e7472696275746f72732d3130322d6f72616e67652e7376673f7374796c653d666c61742d737175617265)
The community maintained a list of Algorithms and Data Structures implementations.
Algorithm |
Code |
|
|
|
|
2
|
3
|
|
|
|
Bin Sort |
ar-binsrt |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
Binary Search |
ar-bsrh |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
Breadth First Search |
gr-bfsrh |
✔ |
|
✔ |
✔ |
|
✔ |
|
|
✔ |
Bubble Sort |
ar-bsrt |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
Coin Change Problem |
ar-cochprb |
✔ |
|
✔ |
✔ |
|
|
✔ |
✔ |
|
Depth First Search |
gr-dfsrh |
✔ |
✔ |
|
✔ |
|
✔ |
✔ |
✔ |
✔ |
Dijkstra Algorithm |
gr-dij |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
|
|
Exponentiation by Squaring |
ar-expsq |
✔ |
|
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
Heap Sort |
ar-hsrt |
✔ |
✔ |
✔ |
✔ |
|
✔ |
|
|
✔ |
Insertion Sort |
ar-isrt |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
✔ |
Knuth–Morris–Pratt |
ar-kmp |
|
✔ |
✔ |
✔ |
|
✔ |
|
✔ |
✔ |
K-NN |
ar-knn |
|
✔ |
|
|
|
|
|
|
|
Largest Sum Contiguous Sub-Array |
ar-lscsa |
|
✔ |
✔ |
✔ |
|
✔ |
✔ |
|
✔ |
Linear Regression |
ar-lreg |
✔ |
✔ |
|
|
|
✔ |
|
✔ |
✔ |
Linear Search |
ar-lsrh |
✔ |
|
|
✔ |
|
✔ |
✔ |
✔ |
Longest Common Subsequence |
ar-lcs |
|
|
|
✔ |
✔ |
✔ |
|
|
|
Longest Increasing Subsequence |
ar-lis |
|
|
|
✔ |
|
✔ |
|
✔ |
|
Longest Palindromic Substring |
ar-lps |
|
|
|
✔ |
|
|
|
|
|
Merge Sort |
ar-msrt |
✔ |
✔ |
|
✔ |
|
✔ |
✔ |
✔ |
✔ |
Modular Exponential |
ar-mexp |
|
|
|
|
|
|
|
✔ |
✔ |
Naive Search |
ar-nsrh |
|
✔ |
|
✔ |
|
|
|
|
|
Prime Factor |
ar-prfac |
✔ |
|
|
✔ |
|
✔ |
|
|
|
Prims |
gr-prims |
|
|
|
|
|
|
|
|
|
Quick Select |
ar-qsel |
|
|
|
|
|
|
|
|
|
Quick Sort |
ar-qsrt |
✔ |
|
|
✔ |
|
|
|
|
|
Radix Sort |
ar-radsrt |
|
✔ |
|
|
|
|
|
|
|
Rod Cutting Problem |
ar-rcprb |
|
|
|
|
|
|
|
|
|
Selection Sort |
ar-ssrt |
✔ |
|
|
✔ |
|
✔ |
|
|
|
Shell Sort |
ar-shsrt |
✔ |
✔ |
|
✔ |
|
✔ |
|
|
|
Sieve of Eratosthenes |
ar-soer |
|
|
|
✔ |
|
|
|
|
|
Sleep Sort |
ar-slpsrt |
✔ |
|
|
✔ |
|
|
|
✔ |
|
Data Structure |
Code |
|
|
|
|
2
|
3
|
|
|
|
Stack |
ds-stk |
✔ |
✔ |
|
✔ |
✔ |
✔ |
|
✔ |
✔ |
Queue |
ds-que |
✔ |
|
|
✔ |
|
✔ |
✔ |
✔ |
✔ |
Circular Queue |
ds-cque |
✔ |
✔ |
|
✔ |
|
|
|
|
|
Priority Queue |
ds-pque |
|
|
|
✔ |
|
|
|
|
|
Singly Linked-list |
ds-slinklst |
✔ |
|
|
✔ |
|
✔ |
|
|
|
Doubly Linked-list |
ds-dlinklst |
|
|
|
|
|
✔ |
|
|
|
Tree |
ds-tree |
|
|
|
|
|
|
|
|
|
Binary Search Tree |
ds-btree |
✔ |
|
|
✔ |
✔ |
✔ |
|
|
|
AVL Tree |
ds-avltree |
|
|
|
|
|
|
|
|
|
Language |
Steps |
C |
gcc <filename.c> ./a.out # unix a.exe # windows |
C++ |
g++ <filename.cpp> ./a.out # unix a.exe # windows |
Java |
javac <filename.java> java <filename> |
Python |
python <filename.py> |
Golang |
go run <filename.go> |
JavaScript |
node <filename.js> |
TypeScript |
npm install -g typescript tsc <filename.ts> node <filename.js> |
C# |
mcs <filename.cs> mono <filename.exe> |
See CONTRIBUTING.md.
If you plan to suggest a new algorithm or DS, please make sure to read the guidelines.