Skip to content
Snippets Groups Projects
Commit d0f21861 authored by Mickael Da Silva's avatar Mickael Da Silva
Browse files

Tableau partiellement trié

parent fcd69401
No related merge requests found
...@@ -180,6 +180,24 @@ int main(int argc, char **argv){ ...@@ -180,6 +180,24 @@ int main(int argc, char **argv){
free(tab); free(tab);
} }
else if (strcmp(argv[1], "-gtp") == 0)
{
if(argc<4){
printf("Usage: ./tri -gtp <max> <size>\n");
exit(1);
}
size_t max = atoi(argv[2]);
size_t size = atoi(argv[3]);
long* tab = generate_tab(max, size);
triRapide(tab, size/2);
for(size_t i = 0; i < size; i++){
printf("%ld ", tab[i]);
}
printf(".");
printf("\n");
free(tab);
}
else if((strcmp(argv[1], "--insertion-verbose") == 0) || strcmp(argv[1], "-iv")== 0){ else if((strcmp(argv[1], "--insertion-verbose") == 0) || strcmp(argv[1], "-iv")== 0){
int n= 0; int n= 0;
long *tab = readToTab(argv[2], &n); long *tab = readToTab(argv[2], &n);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment