Skip to content
Snippets Groups Projects
Verified Commit 8a3d0f42 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

added function

parent 54012d9c
Branches
No related tags found
No related merge requests found
Pipeline #26912 passed
......@@ -21,6 +21,9 @@ int main(int argc, char **argv) {
return EXIT_FAILURE;
}
// Add variables for input here: size, seed, sorting_algo_number.
int size = atoi(argv[1]);
int seed = atoi(argv[2]);
int sorting_algo_number = atoi(argv[3]);
srand(seed);
int res[size];
random_tab(size, res, -50, 50);
......@@ -78,6 +81,10 @@ void merge_sort(int size, int tab[size]) {
void quick_sort(int size, int array[size], int first, int last) {
// à compléter
}
// Tri rapide récursif
void radix_sort(int size, int array[size]) {
// à compléter
}
// Déterminer si le tableau est trié ou non
bool is_sorted(int size, int tab[size]) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment