Why it doesn't work ?
#10

Well, here's the final version of this method:
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;
}
It's ~60 milliseconds slower than quickSort (though this might depend on the pivot), and ~20 milliseconds faster than yours.
Reply


Messages In This Thread
Why it doesn't work ? - by NeXoR - 01.10.2016, 16:23
Re: Why it doesn't work ? - by Jayse - 01.10.2016, 17:14
Re: Why it doesn't work ? - by Vince - 01.10.2016, 19:46
Re: Why it doesn't work ? - by SickAttack - 02.10.2016, 04:57
Re: Why it doesn't work ? - by Jayse - 02.10.2016, 06:40
Re: Why it doesn't work ? - by SickAttack - 02.10.2016, 06:55
Re: Why it doesn't work ? - by Jayse - 02.10.2016, 07:14
Re: Why it doesn't work ? - by SickAttack - 02.10.2016, 09:58
Re: Why it doesn't work ? - by Jayse - 02.10.2016, 14:31
Re: Why it doesn't work ? - by SickAttack - 02.10.2016, 21:47

Forum Jump:


Users browsing this thread: 1 Guest(s)