Skip to content
Snippets Groups Projects
Verified Commit f528f50e authored by orestis.malaspin's avatar orestis.malaspin
Browse files

typos

parent b4e32670
Branches
No related tags found
No related merge requests found
......@@ -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]);
......
......@@ -2,3 +2,7 @@ bin_tree.o
avl.o
main
main.o
bin_tree.o
avl.o
main
main.o
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment