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

changement de sens

parent 230f4b6b
No related branches found
No related tags found
No related merge requests found
Pipeline #14857 passed
...@@ -176,6 +176,8 @@ int partition(array, low, high) { ...@@ -176,6 +176,8 @@ int partition(array, low, high) {
## Exercice: implémenter les fonctions `quicksort` et `partition` ## Exercice: implémenter les fonctions `quicksort` et `partition`
. . .
```C ```C
void quicksort(int size, int array[size], int first, void quicksort(int size, int array[size], int first,
int last) int last)
...@@ -190,9 +192,32 @@ void quicksort(int size, int array[size], int first, ...@@ -190,9 +192,32 @@ void quicksort(int size, int array[size], int first,
} }
} }
} }
```
# L'algorithme à la main
## Exercice *sur papier*
* Trier par tri rapide le tableau `[5, -2, 1, 3, 10, 15, 7, 4]`
```C
``` ```
# Tri rapide ou quicksort (7/8) # Tri rapide ou quicksort (7/8)
\footnotesize \footnotesize
...@@ -236,28 +261,6 @@ int partition(int size, int array[size], int first, int last) { ...@@ -236,28 +261,6 @@ int partition(int size, int array[size], int first, int last) {
* En moyenne: $\mathcal{O}(N\cdot \log_2(N))$. * En moyenne: $\mathcal{O}(N\cdot \log_2(N))$.
# L'algorithme à la main
## Exercice *sur papier*
* Trier par tri rapide le tableau `[5, -2, 1, 3, 10]`
```C
```
# Tri à bulle (1/4) # Tri à bulle (1/4)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment