Si sa che algoritmo usa internamente la funzione sort in php? Quicksort?
E' una curiosità che mi è venuta prima..
Si sa che algoritmo usa internamente la funzione sort in php? Quicksort?
E' una curiosità che mi è venuta prima..
A naso sembrerebbe Insertion Sort:
Codice PHP:
arTmp[0]->pListLast = NULL;
if (i > 1) {
arTmp[0]->pListNext = arTmp[1];
for (j = 1; j < i-1; j++) {
arTmp[j]->pListLast = arTmp[j-1];
arTmp[j]->pListNext = arTmp[j+1];
}
arTmp[j]->pListLast = arTmp[j-1];
arTmp[j]->pListNext = NULL;
} else {
arTmp[0]->pListNext = NULL;
}
ht->pListTail = arTmp[i-1];