changeset 3 | 0d0e9abd157b |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/code/quicksort.code Tue Feb 22 19:02:39 2011 +0100 1.3 @@ -0,0 +1,10 @@ 1.4 +Input: unsortierter Bereich [p, r] in Array A 1.5 +Output: sortierter Bereich [p, r] in Array A 1.6 + if r > p then 1.7 + wähle Pivotelement x = A[r] 1.8 + m = partition(A, p , r) 1.9 + /* Teile A bzgl. x auf: 1.10 + * A[p],...,A[m-1] <= x <= A[m+1],...,A[r] 1.11 + */ 1.12 + Quicksort(A, p , m - 1) 1.13 + Quicksort (A, m + 1, r) 1.14 \ No newline at end of file