Bucket sort is mainly useful when input is uniformly distributed over a range. For example, consider the following problem.
Sort a large set of floating point numbers which are in range from 0.0 to 1.0 and are uniformly distributed across the range. How do we sort the numbers efficiently?
http://en.wikipedia.org/wiki/Bucket_sort
Read full article from Bucket Sort | GeeksforGeeks
Sort a large set of floating point numbers which are in range from 0.0 to 1.0 and are uniformly distributed across the range. How do we sort the numbers efficiently?
Bucket sort it’s the perfect sorting algorithm for the sequence above. We must know in advance that the integers are fairly well distributed over an interval (i, j). Then we can divide this interval in N equal sub-intervals (or buckets). We’ll put each number in its corresponding bucket. Finally for every bucket that contains more than one number we’ll use some linear sorting algorithm.
Also refer to http://java.dzone.com/articles/algorithm-week-bucket-sorthttp://en.wikipedia.org/wiki/Bucket_sort
Read full article from Bucket Sort | GeeksforGeeks
No comments:
Post a Comment