02.10.2016, 21:47
Well, here's the final version of this method:
It's ~60 milliseconds slower than quickSort (though this might depend on the pivot), and ~20 milliseconds faster than yours.
pawn Code:
stock SortValuesInArray(array[], size_of = sizeof(array))
{
for(new i = (size_of - 1), j, temp; i != 0; i --)
{
for(j = 0; j < i; j ++)
{
if(array[i] < array[j])
{
temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
}
return 1;
}

