prepare le merge

This commit is contained in:
abraham
2026-10-21 11:36:11 +02:00
parent 1ada0848f4
commit 1b9c2aace2
3 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -84,11 +84,11 @@ 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 1 nom du commit : "EXO 4 - optimisation F1". Emprunte : ff68d260a7a58441
- 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 3 nom du commit : "EXO 4 - optimisation F3". Emprunte : ff68d260a7a58441
- Optimisation de la fonction 4 nom du commit : "fonction 4 : O(n + J)". Emprunte : ff68d260a7a58441
BIN
View File
Binary file not shown.
+5 -4
View File
@@ -146,11 +146,12 @@ long meilleure_periode(const long *totaux, int nb_jours, int *debut, int *fin)
}
/* F6 : retrouve une transaction à partir de son id */
const Transaction *rechercher_par_id(const Transaction *t, const int *indices_par_id, int n, int id)
const Transaction *rechercher_par_id(const Transaction *t, int n, int id)
{
if (id < 0 || id >= n)
return NULL;
return &t[indices_par_id[id]];
for (int i = 0; i < n; i++)
if (t[i].id == id)
return &t[i];
return NULL;
}
/* F7 : nombre de paires de transactions de montants opposés (a + b = 0) */