From bce30b8179c6239191b8d46c6b925c3ad90d6d6b Mon Sep 17 00:00:00 2001 From: Volodymyr Date: Thu, 4 Oct 2018 00:34:44 -0400 Subject: [PATCH] Added Bucket Sort description --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 422bc9f68..a11afcd88 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,16 @@ __Properties__ ###### View the algorithm in [action][bubble-toptal] +### Bucket +![alt text][bucket-image-1] +![alt text][bucket-image-2] + +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. + +__Properties__ +* Worst case performance O(n^2) +* Best case performance O(n+k) +* Average case performance O(n+k) ### Insertion @@ -148,6 +158,10 @@ Mathematically a bijective function is used on the characters' positions to encr [bubble-wiki]: https://en.wikipedia.org/wiki/Bubble_sort [bubble-image]: https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Bubblesort-edited-color.svg/220px-Bubblesort-edited-color.svg.png "Bubble Sort" +[bucket-wiki]: https://en.wikipedia.org/wiki/Bucket_sort +[bucket-image-1]: https://commons.wikimedia.org/wiki/File:Bucket_sort_1.svg#/media/File:Bucket_sort_1.svg +[bucket-image-2]: https://commons.wikimedia.org/wiki/File:Bucket_sort_2.svg#/media/File:Bucket_sort_2.svg + [insertion-toptal]: https://www.toptal.com/developers/sorting-algorithms/insertion-sort [insertion-wiki]: https://en.wikipedia.org/wiki/Insertion_sort [insertion-image]: https://upload.wikimedia.org/wikipedia/commons/7/7e/Insertionsort-edited.png "Insertion Sort"