Bucket Sort 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? A simple way is to apply a comparison based sorting algorithm. The lower bound for Comparison based sorting algorithm (Merge Sort, Heap Sort, Quick-Sort .. etc) is , i.e., they cannot do better than nLogn. Can we sort the array in linear time?
Read full article from Bucket Sort | GeeksforGeeks
No comments:
Post a Comment