Beruflich Dokumente
Kultur Dokumente
7.6.5
Implementation
Next, recall that our goal is to partition all remaining elements based
on whether they are smaller than or greater than the pivot
We will find two entries:
One larger than the pivot (staring from the front)
One smaller than the pivot (starting from the back)
7.6.5
Quick Sort
Implementation
Continue doing so until the appropriate entries you find are actually
in order
The index to the larger entry we found would be the first large entry
in the list (as seen from the left)
Therefore, we could move this entry into the last entry of the list
We can fill this spot with the pivot
7.6.5
Quick Sort
Quick Sort
7.6.5
7.6.5
Quick Sort
7.6.5
Quick Sort
7.6.5
Quick Sort
7.6.5
Quick Sort
7.6.5
Quick Sort
Quick Sort
7.6.5
10
7.6.5
Quick Sort
11
7.6.5
Quick Sort
12
7.6.5
Quick Sort
13
Quick Sort
7.6.5
14
7.6.5
Quick Sort
15
7.6.5
Quick Sort
16
7.6.5
Quick Sort
17
7.6.5
Quick Sort
18
7.6.5
Quick Sort
19
7.6.5
Quick Sort
20
7.6.5
Quick Sort
21
7.6.5
Quick Sort
22
7.6.5
Quick Sort
23
7.6.5
Quick Sort
24
7.6.5
Quick Sort
25
7.6.5
Quick Sort
26
7.6.5
Quick Sort
27
7.6.5
Quick Sort
28
7.6.5
Quick Sort
29
7.6.5
Quick Sort
30
7.6.5
Quick Sort
31
7.6.5
Quick Sort
32
7.6.5
Quick Sort
33
7.6.5
Quick Sort
34
7.6.5
Quick Sort
35
7.6.5
Quick Sort
36
7.6.5
Quick Sort
37
Quick Sort
7.6.5
38
7.6.5
Quick Sort
39
7.6.5
Quick Sort
40
7.6.5
Quick Sort
41
7.6.5
Quick Sort
42
7.6.5
Quick Sort
43
7.6.5
Quick Sort
44
7.6.5
Quick Sort
45