[Solved] Algorithms for bucket sort


This is basically a link only answer but it gives you the information you need to formulate a good question.

Bucket Sort

Wikipedia’s step 1, where you “Set up an array of initially empty buckets”, will need to include buckets for negative numbers.

Counting Sort

“Compared to counting sort, bucket sort requires linked lists, dynamic arrays or a large amount of preallocated memory to hold the sets of items within each bucket, whereas counting sort instead stores a single number (the count of items) per bucket.”

2

solved Algorithms for bucket sort