Skip to content

Commit caea476

Browse files
authored
Merge pull request TheAlgorithms#412 from klymenkoo/update-readme
Added Algorithm descriptions to README.md
2 parents f98a5f7 + 5db4e54 commit caea476

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@ __Properties__
1919

2020
###### View the algorithm in [action][bubble-toptal]
2121

22+
### Bucket
23+
![alt text][bucket-image-1]
24+
![alt text][bucket-image-2]
25+
26+
From [Wikipedia][bucket-wiki]: Bucket sort, or bin sort, is a sorting algorithm that works by distributing the elements of an array into a number of buckets. Each bucket is then sorted individually, either using a different sorting algorithm, or by recursively applying the bucket sorting algorithm.
27+
28+
__Properties__
29+
* Worst case performance O(n^2)
30+
* Best case performance O(n+k)
31+
* Average case performance O(n+k)
32+
33+
### Coctail shaker
34+
![alt text][cocktail-shaker-image]
35+
36+
From [Wikipedia][cocktail-shaker-wiki]: Cocktail shaker sort, also known as bidirectional bubble sort, cocktail sort, shaker sort (which can also refer to a variant of selection sort), ripple sort, shuffle sort, or shuttle sort, is a variation of bubble sort that is both a stable sorting algorithm and a comparison sort. The algorithm differs from a bubble sort in that it sorts in both directions on each pass through the list.
37+
38+
__Properties__
39+
* Worst case performance O(n^2)
40+
* Best case performance O(n)
41+
* Average case performance O(n^2)
2242

2343

2444
### Insertion
@@ -59,6 +79,15 @@ __Properties__
5979

6080
###### View the algorithm in [action][quick-toptal]
6181

82+
### Radix
83+
84+
From [Wikipedia][radix-wiki]: In computer science, radix sort is a non-comparative integer sorting algorithm that sorts data with integer keys by grouping keys by the individual digits which share the same significant position and value.
85+
86+
__Properties__
87+
* Worst case performance O(wn)
88+
* Best case performance O(wn)
89+
* Average case performance O(wn)
90+
6291
### Selection
6392
![alt text][selection-image]
6493

@@ -83,6 +112,10 @@ __Properties__
83112

84113
###### View the algorithm in [action][shell-toptal]
85114

115+
### Topological
116+
117+
From [Wikipedia][topological-wiki]: In the field of computer science, a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering. For instance, the vertices of the graph may represent tasks to be performed, and the edges may represent constraints that one task must be performed before another; in this application, a topological ordering is just a valid sequence for the tasks. A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic graph (DAG). Any DAG has at least one topological ordering, and algorithms are known for constructing a topological ordering of any DAG in linear time.
118+
86119
### Time-Complexity Graphs
87120

88121
Comparing the complexity of sorting algorithms (Bubble Sort, Insertion Sort, Selection Sort)
@@ -148,6 +181,13 @@ Mathematically a bijective function is used on the characters' positions to encr
148181
[bubble-wiki]: https://en.wikipedia.org/wiki/Bubble_sort
149182
[bubble-image]: https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Bubblesort-edited-color.svg/220px-Bubblesort-edited-color.svg.png "Bubble Sort"
150183

184+
[bucket-wiki]: https://en.wikipedia.org/wiki/Bucket_sort
185+
[bucket-image-1]: https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/Bucket_sort_1.svg/311px-Bucket_sort_1.svg.png "Bucket Sort"
186+
[bucket-image-2]: https://upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Bucket_sort_2.svg/311px-Bucket_sort_2.svg.png "Bucket Sort"
187+
188+
[cocktail-shaker-wiki]: https://en.wikipedia.org/wiki/Cocktail_shaker_sort
189+
[cocktail-shaker-image]: https://upload.wikimedia.org/wikipedia/commons/e/ef/Sorting_shaker_sort_anim.gif "Cocktail Shaker Sort"
190+
151191
[insertion-toptal]: https://www.toptal.com/developers/sorting-algorithms/insertion-sort
152192
[insertion-wiki]: https://en.wikipedia.org/wiki/Insertion_sort
153193
[insertion-image]: https://upload.wikimedia.org/wikipedia/commons/7/7e/Insertionsort-edited.png "Insertion Sort"
@@ -156,6 +196,8 @@ Mathematically a bijective function is used on the characters' positions to encr
156196
[quick-wiki]: https://en.wikipedia.org/wiki/Quicksort
157197
[quick-image]: https://upload.wikimedia.org/wikipedia/commons/6/6a/Sorting_quicksort_anim.gif "Quick Sort"
158198

199+
[radix-wiki]: https://en.wikipedia.org/wiki/Radix_sort
200+
159201
[merge-toptal]: https://www.toptal.com/developers/sorting-algorithms/merge-sort
160202
[merge-wiki]: https://en.wikipedia.org/wiki/Merge_sort
161203
[merge-image]: https://upload.wikimedia.org/wikipedia/commons/c/cc/Merge-sort-example-300px.gif "Merge Sort"
@@ -168,6 +210,8 @@ Mathematically a bijective function is used on the characters' positions to encr
168210
[shell-wiki]: https://en.wikipedia.org/wiki/Shellsort
169211
[shell-image]: https://upload.wikimedia.org/wikipedia/commons/d/d8/Sorting_shellsort_anim.gif "Shell Sort"
170212

213+
[topological-wiki]: https://en.wikipedia.org/wiki/Topological_sorting
214+
171215
[linear-wiki]: https://en.wikipedia.org/wiki/Linear_search
172216
[linear-image]: http://www.tutorialspoint.com/data_structures_algorithms/images/linear_search.gif
173217

0 commit comments

Comments
 (0)