Skip to content
This repository has been archived by the owner on Oct 29, 2020. It is now read-only.

Update README.md #238

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Javascript/counting_sort.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
elements = [55,12,13,99,7]
maxSize = Math.max(...elements)
minSize = Math.min(...elements)
temp = new Array()
function oneArrayElements(element, index, array) {
temp[element]=1
}
elements.forEach(oneArrayElements);
b = new Array()


function orderArrayElements(element, index, array) {
if (element==1)
b.push(index)
}

temp.forEach(orderArrayElements);

b
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
Reference purposes .

1. Knuth-Morris-Pratt Algorithm [cpp](https://github.com/saru95/DSA/blob/master/CPP/KMP.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/KMP.py)
2. Depth First Search w/o stack [cpp](https://github.com/saru95/DSA/blob/master/CPP/DFS.cpp) [python](https://github/com/saru95/DSA/blob/master/Python/DFS.py)
2. Depth First Search w/o stack [cpp](https://github.com/saru95/DSA/blob/master/CPP/DFS.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/DFS.py)
3. Depth First Search with stack [cpp](https://github.com/saru95/DSA/blob/master/CPP/DFSS.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/DFSS.py)
4. Breadth First Search [cpp](https://github.com/saru95/DSA/blob/master/CPP/BFS.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/BFS.py) [java](https://github.com/saru95/DSA/blob/master/Java/BreadthFirstPaths.java) [kotlin](https://github.com/saru95/DSA/blob/master/Kotlin/BreadthFirstPaths.kt)
5. Suffix Arrays [cpp](https://github.com/saru95/DSA/blob/master/CPP/SuffixArray.cpp)
6. Segment Trees [cpp](https://github.com/saru95/DSA/blob/master/CPP/SegmentTrees.cpp) [python](https://github.com/saru95/DSA/blob/patch-1/Python/SEGTREE.py) [java](https://github.com/saru95/DSA/blob/master/Java/SegmentTrees.java) [kotlin](https://github.com/saru95/DSA/blob/master/Kotlin/SegmentTree.kt)
6. Segment Trees [cpp](https://github.com/saru95/DSA/blob/master/CPP/SegmentTrees.cpp) [python](https://github.com/saruftw/DSA/blob/master/Python/SEGTREE.py) [java](https://github.com/saru95/DSA/blob/master/Java/SegmentTrees.java) [kotlin](https://github.com/saru95/DSA/blob/master/Kotlin/SegmentTree.kt)
7. Segment Trees with Lazy Propogation [cpp](https://github.com/saru95/DSA/blob/master/CPP/SegmentTreesLazy.cpp)
8. Segment Trees with Max Prefix/Suffix Sum and Max Subvector Sum [cpp](https://github.com/saru95/DSA/blob/master/CPP/SEGTREE.cpp)
9. Euler Totient Function [cpp](https://github.com/saru95/DSA/blob/master/CPP/EulerTotient.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/EulerTotient.py)
10. Dijkstra's Algorithm [cpp](https://github.com/saru95/DSA/blob/master/CPP/Djikstras.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/dijkstra.py) [java](https://github.com/saru95/DSA/blob/master/Java/Dijkstra.java) [kotlin](https://github.com/saru95/DSA/blob/master/Kotlin/Dijkstra.kt)
11. Fast Modulo Multiplication / Binary Exponention [cpp](https://github.com/saru95/DSA/blob/master/CPP/Fmm.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/Fmm.py) [java](https://github.com/saru95/DSA/blob/master/Java/Fmm.java) [kotlin](https://github.com/saru95/DSA/blob/master/Kotlin/Fmm.kt)
10. Dijkstra's Algorithm [cpp](https://github.com/saru95/DSA/blob/master/CPP/Djikstras.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/dijkstra.py) [java](https://github.com/saru95/DSA/blob/master/Java/Dijkstra.java)
11. Fast Modulo Multiplication / Binary Exponention [cpp](https://github.com/saru95/DSA/blob/master/CPP/Fmm.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/Fmm.py) [java](https://github.com/saru95/DSA/blob/master/Java/Fmm.java)
12. Meet in Middle [cpp](https://github.com/saru95/DSA/blob/master/CPP/Mim.cpp) [python](https://github.com/saru95/DSA/blob/patch-5/Python/MeetInTheMiddle.py)
12. Meet in Middle [cpp](https://github.com/saru95/DSA/blob/master/CPP/Mim.cpp) [python](https://github.com/saruftw/DSA/blob/master/Python/MeetInTheMiddle.py)
13. Binary Search [cpp](https://github.com/saru95/DSA/blob/master/CPP/BinarySearch.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/BinarySearch.py) [java](https://github.com/saru95/DSA/blob/master/Java/BinarySearch.java) [kotlin](https://github.com/saru95/DSA/blob/master/Kotlin/BinarySearch.kt) [coffee](https://github.com/saru95/DSA/blob/master/Coffee/binary_search.coffee) [f#](https://github.com/saru95/DSA/blob/master/Fsharp/binary_search.fs) [chapel](https://github.com/saru95/DSA/blob/master/Chapel/binary_search.chpl)
14. Matrix Exponention for Fibonacci Series [cpp](https://github.com/saru95/DSA/blob/master/CPP/Me.cpp)
15. Modular Multipicative Inverse using Fermat's Theorem [cpp](https://github.com/saru95/DSA/blob/master/CPP/Mmi.cpp)
16. Tries [cpp](https://github.com/saru95/DSA/blob/master/CPP/Tries.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/tries.py)
16. Tries [python](https://github.com/saru95/DSA/blob/master/Python/tries.py)
17. Bellman-Ford Algorithm [cpp](https://github.com/saru95/DSA/blob/master/CPP/BellmanFord.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/BellmanFord.py)
18. Rabin-Karp Algorithm [cpp](https://github.com/saru95/DSA/blob/master/CPP/RabinKarp.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/RabinKarp.py)
19. Binary Search Tree [python](https://github.com/saru95/DSA/blob/master/Python/BinarySearchTree.py) [c](https://github.com/saru95/DSA/blob/master/C/BST.c)
Expand Down Expand Up @@ -60,7 +60,7 @@ Reference purposes .
55. Sieve implemented with BIT [cpp](https://github.com/saru95/DSA/blob/master/CPP/BIt-Sieve.cpp)
56. Z algorithm (Linear time pattern searching Algorithm) [cpp](https://github.com/saru95/DSA/blob/master/CPP/z-algorithm.cpp)
57. Karatsuba algorithm (for fast multiplication) [cpp](https://github.com/saru95/DSA/blob/master/CPP/Karatsuba_algorithm.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/karatsuba.py)
58. Counting sort [cpp](https://github.com/saru95/DSA/blob/master/CPP/Counting_Sort.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/counting_sort.py)
58. Counting sort [cpp](https://github.com/saru95/DSA/blob/master/CPP/Counting_Sort.cpp) [python](https://github.com/saru95/DSA/blob/master/Python/counting_sort.py) [Javascript](https://github.com/ristovao/DSA/blob/master/Javascript/counting_sort.py)
59. Modular Multiplicative Inverse [cpp](https://github.com/saru95/DSA/blob/master/CPP/ModularMultiplicativeInverse.cpp)
60. Counting sort [cpp](https://github.com/saru95/DSA/blob/master/CPP/Counting_Sort.cpp)
61. CircularBuffer [cpp](https://github.com/saru95/DSA/blob/master/CPP/CircularBuffer.cpp)
Expand Down