If (low == high)
return;
Will prevent a crash from an empty array, providing hi is the last index of the array, with good data to be sorted.
Before BASIC supported recursion - back when...
Type: Posts; User: Adak
If (low == high)
return;
Will prevent a crash from an empty array, providing hi is the last index of the array, with good data to be sorted.
Before BASIC supported recursion - back when...
The biggest improvement to Quicksort that I know of, is to add Insertion sort (and calls to it), when the sub arrays are small (say 15 to 60 or so, depending on your own system).
imo, no sorter is...