TD1
This commit is contained in:
parent
ca552281c9
commit
65c2b08716
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
gmon.out
|
||||
student_rank
|
11
note.txt
Normal file
11
note.txt
Normal 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
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user