![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Rekursion - slide 25 : 27 |
Vi viser først den overordnede quicksort funktion
Den viste udgave sorterer blot heltal
/* Sort the array interval a[from..to] */ void quicksort(element a[], index from, index to){ index point1, point2; if (from < to){ do_partitioning(a, from, to, &point1, &point2); partitioning_info(a, from, to, point1, point2); quicksort(a, from, point1); quicksort(a, point2, to); } }