From f528f50e3a73664836daf3c0e6a3328ea1ed6cc0 Mon Sep 17 00:00:00 2001 From: Orestis <orestis.malaspinas@pm.me> Date: Tue, 8 Nov 2022 22:31:41 +0100 Subject: [PATCH] typos --- slides/cours_6.md | 15 +++++++++------ source_codes/arbres_AVL/.gitignore | 4 ++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/slides/cours_6.md b/slides/cours_6.md index 075eab4..fcb044d 100644 --- a/slides/cours_6.md +++ b/slides/cours_6.md @@ -153,13 +153,17 @@ int pow(int x, int n) { return 1; } for (int i = 1; i < n; ++i) { - x *= x; + x = x * x; // x *= x } return x; } ``` -* Complexité? Combien de multiplication en fonction de `n`? +* Combien de multiplication et d'assignations en fonction de `n`? + +. . . + +* `n` assignations et `n` multiplications. # Exponentiation rapide ou indienne (2/4) @@ -233,8 +237,7 @@ Comment mesurer l'efficacité d'un algorithme? . . . -Dépendant du **matériel**, du **compilateur**, des **options de compilation**, -etc! +Dépendant du **matériel**, du **compilateur**, des **options de compilation**, etc! ## Mesure du temps CPU @@ -436,7 +439,7 @@ $$ ## Complexité de trouver le minimum d'un tableau? ```C -min = MAX; +int min = MAX; for (i = 0; i < N; ++i) { if (tab[i] < min) { min = tab[i]; @@ -458,7 +461,7 @@ $$ ## Complexité du tri par sélection? ```C -ind = 0 +int ind = 0 while (ind < SIZE-1) { min = find_min(tab[ind:SIZE]); swap(min, tab[ind]); diff --git a/source_codes/arbres_AVL/.gitignore b/source_codes/arbres_AVL/.gitignore index f8a1ca8..1d1d030 100644 --- a/source_codes/arbres_AVL/.gitignore +++ b/source_codes/arbres_AVL/.gitignore @@ -2,3 +2,7 @@ bin_tree.o avl.o main main.o +bin_tree.o +avl.o +main +main.o -- GitLab