#include <stdlib.h> #include <stdbool.h> #include "tri.h" void triBulle(int32_t sorted[], const int32_t *const orig, int32_t nitems, bool (*comp)(int32_t, int32_t)){ copierTableau(sorted, orig, nitems); int tmp; for(int i=0; i < nitems-1; i++){ for(int j=0; i < (nitems-i-1); j++){ //Décroissant < if (sorted[j] > sorted[j+1]){ tmp = sorted[j]; sorted[j] = sorted[j+1]; sorted[j+1] = tmp; } } } } void triRapide(int32_t sorted[], const int32_t *const orig, int32_t nitems, bool (*comp)(int32_t, int32_t)){ } void triPile(int32_t sorted[], const int32_t *const orig, int32_t nitems, bool (*comp)(int32_t, int32_t)){ } void copierTableau(int32_t *copie, const int32_t *const orig, int32_t size){ for (int32_t i = 0; i<size; i++){ copie[i] = orig[i]; } }