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

corrected typos

parent ab66b640
No related branches found
No related tags found
No related merge requests found
---
title: "Tris et backtracking"
date: "2021-11-12"
date: "2021-11-10"
patat:
eval:
tai:
......@@ -140,7 +140,7 @@ int low, high; // les indices min/max des tableaux à trier
```C
void quicksort(array, low, high) {
if (less than 2 elems) {
if (more than 2 elems) {
pivot_ind = partition(array, low, high);
if (something left of pivot)
quicksort(array, low, pivot_ind - 1);
......@@ -157,8 +157,8 @@ void quicksort(array, low, high) {
```C
int partition(array, low, high) {
pivot = array[high]; // choix arbitraire
i = first - 1;
j = last;
i = low;
j = high-1;
while i < j {
en remontant i trouver le premier élément > pivot;
en descendant j trouver le premier élément < pivot;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment