forked from menault/2026_TD3_DEV51_Qualite_Algo
fonction 4 : O(n + J)
This commit is contained in:
+17
-1
@@ -84,9 +84,25 @@ La complexité de la fonction est de <span style="color:blue">[O(n)]</span> pour
|
||||
|
||||
# 4. Optimisation
|
||||
|
||||
- Optimisation de la fonction 1 nom du commit : ""
|
||||
|
||||
Optimisation de la fonction 2 nom du commit : "fonction 2 : O(n + C)"
|
||||
- Optimisation de la fonction 2 nom du commit : "fonction 2 : O(n + C)". Emprunte : ff68d260a7a58441
|
||||
|
||||
- Optimisation de la fonction 3 nom du commit : "". Emprunte : ff68d260a7a58441
|
||||
|
||||
- Optimisation de la fonction 4 nom du commit : "fonction 4 : O(n + J)". Emprunte : ff68d260a7a58441
|
||||
|
||||
- Optimisation de la fonction 5 nom du commit : "". Emprunte : ff68d260a7a58441
|
||||
|
||||
- Optimisation de la fonction 6 nom du commit : "". Emprunte : ff68d260a7a58441
|
||||
|
||||
- Optimisation de la fonction 7 nom du commit : "". Emprunte : ff68d260a7a58441
|
||||
|
||||
- Optimisation de la fonction 8 nom du commit : "". Emprunte : ff68d260a7a58441
|
||||
|
||||
- Optimisation de la fonction 9 nom du commit : "". Emprunte : ff68d260a7a58441
|
||||
|
||||
- Optimisation de la fonction 10 nom du commit : "". Emprunte : ff68d260a7a58441
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -118,10 +118,10 @@ void total_par_jour(const Transaction *t, int n, long *totaux)
|
||||
{
|
||||
for (int j = 0; j < NB_JOURS; j++) {
|
||||
totaux[j] = 0;
|
||||
for (int i = 0; i < n; i++)
|
||||
if (t[i].jour == j)
|
||||
totaux[j] += t[i].montant;
|
||||
}
|
||||
|
||||
for (int i = 0; i < n; i++)
|
||||
totaux[t[i].jour] += t[i].montant;
|
||||
}
|
||||
|
||||
/* F5 : période de jours consécutifs dont la somme des soldes est maximale */
|
||||
|
||||
Reference in New Issue
Block a user