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
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,16 +9,16 @@ Bucket Sort, also known as Bin Sort, is a distributed sorting algorithm, which s
9
9
See the algorithm in action [here](https://www.cs.usfca.edu/~galles/visualization/BucketSort.html) and [here](http://www.algostructure.com/sorting/bucketsort.php).
10
10
11
11
The performance for execution time is:
12
-
12
+
13
13
| Case | Performance |
14
14
|:-------------: |:---------------:|
15
15
| Worst | O(n^2) |
16
16
| Best | Omega(n + k) |
17
-
| Average | Theta(n + k) |
18
-
17
+
| Average | Theta(n + k) |
18
+
19
19
Where **n** = the number of elements and **k** is the number of buckets.
20
20
21
-
In the *best case*, the algorithm distributes the elements uniformily between buckets, a few elements are placed on each bucket and sorting the buckets is **O(1)**. Rearranging the elements is one more run through the initial list.
21
+
In the *best case*, the algorithm distributes the elements uniformly between buckets, a few elements are placed on each bucket and sorting the buckets is **O(1)**. Rearranging the elements is one more run through the initial list.
22
22
23
23
In the *worst case*, the elements are sent all to the same bucket, making the process take **O(n^2)**.
0 commit comments