You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Bucket Sort/README.markdown
+80Lines changed: 80 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,18 @@ A more complete definition could be
12
12
>
13
13
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. It is a distribution sort, and is a cousin of radix sort in the most to least significant digit flavour. Bucket sort is a generalization of pigeonhole sort. Bucket sort can be implemented with comparisons and therefore can also be considered a comparison sort algorithm. The computational complexity estimates involve the number of buckets. [1](https://en.wikipedia.org/wiki/Bucket_sort)
14
14
15
+
## Performance
16
+
17
+
Performance for execution time:
18
+
19
+
| Case | Performance |
20
+
|:-------------: |:---------------:|
21
+
| Worst | O(n^2) |
22
+
| Best | Omega(n + k) |
23
+
| Average | Theta(n + k) |
24
+
25
+
Where **n** = #elements and **k** = #buckets
26
+
15
27
16
28
## Pseudocode
17
29
@@ -117,5 +129,73 @@ The algorithm is designed to sort integers, so all the elements to be sorted sho
0 commit comments