Bucket Sorting
Clinton Weng, Frank Hui
Burnaby North Secondary
Floor Location : J 135 F

In a world where high-speed calculations and sorting millions of numbers efficiently is crucial, sorting algorithms that can compile data at lightning speeds is crucial. A calculation that is quicker even by only a few seconds can make the largest difference. An inefficient algorithm called Sinking Sort is very slow. The number of executions is the square of the numbers it needs to calculate, so it’s extremely inefficient.

We can make it efficient by splitting the numbers into groups, or “buckets”, sorting them, and then reforming them back. This makes it quicker because the number of executions is significantly smaller. How many groups do we split them into? If there are too many, then the algorithm starts to become inefficient, and if there is not enough, it’s not at all. Our experiment investigates what the optimal number of buckets is to sort 5000 numbers. 5000 numbers were input into our program and we changed the number of groups every time we finished 10 trials. My results showed that 34 buckets is the most efficient number of buckets. We concluded that though lots of buckets will increase the performance, too many will make the performance slower. Therefore, we went and tried many different amounts of buckets to see how many would sort 5000 numbers most effectively.