12.01.2019, 20:04
Hello, there's a way to make the Quicksort algorithm by RyDeR`in descending order?
https://forum.sa-mp.com/showpost.php...postcount=1737
https://forum.sa-mp.com/showpost.php...postcount=1737
for(new i = 0; i < 500; i++)
{
SortScore[i][1] = ScoreID[i];
}
SortDeepArray(SortScore, 0, .order = SORT_DESC); // This part
for(new i = 0; i < 10; i++)
{
printf("%i", SortScore[i][1]);
}
enum
tempArrayEnum {
tempArraySort
};
new
tempArray[24][tempArrayEnum] = {
95, 3, 7, 2, 233, 75, 1
};
SortDeepArray(tempArray, tempArraySort, .order = SORT_DESC);
PHP код:
Will become; 0, 0, 0, ..., 1, 2, 3, 7, 75, 95, 233 Loop through the array after you deep sort it, "continue" if "tempArraySort" == 0, this will give you your desired result. |