Bucket sort is a generic variant of the pigeonhole sorting algorithm which works by splitting a list into "buckets" based on arbitrary boundaries, sorting the buckets, and recombining the buckets in order.
A Bucket Sort takes arbitrary boundaries, then iterates through the input array and places the elements into a new array (its "bucket") based on the boundaries. After this, the sub-arrays are sorted separately. Finally, the sub-arrays are merged in order. Note that the Bucket Sort is not capable of sorting an array on its own; it must either recursively call itself, and recognize when passed an array of length 0 or 1, or call a different algorithm, in order to sort the buckets.