public final class FastQSort extends InsertionSort
SortApp.SortAlgorithm
+ minor improvements.stopRequested
Constructor and Description |
---|
FastQSort() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Start as application.
|
(package private) void |
quickSort(int[] a,
int l,
int r)
A generic version of C.A.R Hoare's Quick Sort algorithm.
|
void |
sort(int[] a)
The real sorting method.
|
insertionSort
getMaxPossiVal, pause, pause, pause, startMe, stop, swap
void quickSort(int[] a, int l, int r)
a
- the array to be sortedl
- left boundary of array partitionr
- right boundary of array partitionpublic void sort(int[] a)
SortApp.SortAlgorithm
SortApp.SortAlgorithm.pause(int, int)
, SortApp.SortAlgorithm.pause(int)
, SortApp.SortAlgorithm.pause()
directly
or indirectly by utilising SortApp.SortAlgorithm.swap(int, int)
for element
exchanges within the array having been provided to this
sort
implementation. pausing
does all else like counting steps,
displaying the sorting state and else.sort
in class InsertionSort
public static void main(java.lang.String[] args)
SortApp.SortAlgorithm.startMe()