diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d2c52d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +gmon.out +student_rank diff --git a/note.txt b/note.txt new file mode 100644 index 0000000..c112f32 --- /dev/null +++ b/note.txt @@ -0,0 +1,11 @@ +execution en 1000 1000 +bubblesort prends 83.65% du temps d'éxécution de l'algo + +execution en 1000 10000 +30 sec d'execution + +piste optimisation : +réduire appel bubblesort + +après avoir enlever l'appel de bubblesort dans find_rank_student +0.5 sec d'execution \ No newline at end of file diff --git a/student_rank.c b/student_rank.c index af84003..c6dc75a 100644 --- a/student_rank.c +++ b/student_rank.c @@ -55,7 +55,6 @@ int find_rank_student(int student_grade, int* grades_array, int students_number) { int position = -1; int i = 0; - bubblesort(grades_array,students_number); for(i = students_number-1; i >= 0; i--) { if(grades_array[i] == student_grade)