Compare commits

...

1 Commits
main ... main

Author SHA1 Message Date
65c2b08716 TD1 2024-09-03 11:57:04 +02:00
3 changed files with 13 additions and 1 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
gmon.out
student_rank

11
note.txt Normal file
View File

@ -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

View File

@ -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)