codebytes: Quick Sort With Minor Improvements
1. Setting the element with index hi (the pivot element) equal to the median of the three elements lo, hi and (lo+hi) / 2 so that the probability that it lies in between the values is more.2. Using the faster Insertion sort if the number of elements in the sub array is less than some predefined value (the value 5 is used here).
Read full article from codebytes: Quick Sort With Minor Improvements
No comments:
Post a Comment