I need some help with my CS homework. I need to write a sorting routine that sorts an array of length 5 using 7 comparisons in the worst case (I\'ve proven that 7 will be ne
Bucket sort can be implemented as a comparison algorithm as follows:
Take an element.
Compare it to all buckets.
Drop it into the bucket that matches. <- Comparison needed.
If bucket not found, create a new bucket.
Therefore it's a dynamic bucket sort algorithm which I just described.
I already invented/described this on newsgroup in the past.