Bucket Sort Algorithm

Bucket Sort is a sorting algorithm that works by distributing the elements of an array into a number of buckets.

How Dose It Work ?

Step 1 : Distribute into buckets

Step 2 : Sort withn each bucket

Step 3 : Concatenate all buckets.

Best, Average And Worst Cases :

The best-case occurs when all elements are the same and only one bucket is needed, The average-case occurs when elements are randomly distributed, And the worst-case occurs when all elements fall into the same bucket .