Merge pull request #38 from pablohildo/fix/readme

Thanks for contributing
This commit is contained in:
Christian Bender 2019-02-14 21:50:33 +01:00 committed by GitHub
commit 73572f740d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,14 @@ These are for demonstration purposes only.
## Sorting Algorithms ## Sorting Algorithms
### Bogo Sort ### Bogo Sort
Add comments here ![alt text][bogo-image]
From [Wikipedia][bogo-wiki]: Bogo sort is a highly ineffective sorting function based on the generate and test paradigm. The function successively generates permutations of its input until it finds one that is sorted. It is not useful for sorting, but may be used for educational purposes, to contrast it with more efficient algorithms.
__Properties__
* Unbounded (randomized version), O((n+1)!) (deterministic version)
* Best case performance O(n)
* Average case performance O((n+1)!)
### Bubble Sort ### Bubble Sort
![alt text][bubble-image] ![alt text][bubble-image]
@ -75,3 +82,6 @@ __Properties__
[shell-toptal]: https://www.toptal.com/developers/sorting-algorithms/shell-sort [shell-toptal]: https://www.toptal.com/developers/sorting-algorithms/shell-sort
[shell-wiki]: https://en.wikipedia.org/wiki/Shellsort [shell-wiki]: https://en.wikipedia.org/wiki/Shellsort
[shell-image]: https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Shell_sorting_algorithm_color_bars.svg/267px-Shell_sorting_algorithm_color_bars.svg.png "Shell Sort" [shell-image]: https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Shell_sorting_algorithm_color_bars.svg/267px-Shell_sorting_algorithm_color_bars.svg.png "Shell Sort"
[bogo-wiki]: https://en.wikipedia.org/wiki/Bogosort
[bogo-image]: http://www.siafoo.net/graph/d174e8328044fa36d07b25a4c0ad6631