Java Utililty Methods Quick Sort

List of utility methods to do Quick Sort

Description

The list of methods to do Quick Sort are organized into topic(s).

Method

voidquicksort(int[] source)
Sorts this array of integers according to the Quicksort algorithm.
quicksort(source, 0, source.length - 1);
int[]quickSort(int[] source)
quick Sort
return qsort(source, 0, source.length - 1);
voidquickSort(int[] target, int[] coSort)
Sorts the specified target array of ints into ascending numerical order and simultaneously permutes the coSort ints array in the same way then specified target array.
quickSort(target, 0, target.length, coSort);
int[]quickSort(int[] x)
quick Sort
double[] x2 = new double[x.length];
int i;
for (i = 0; i < x.length; i++)
    x2[i] = x[i];
int[] inds = quickSort(x2);
for (i = 0; i < x.length; i++)
    x[i] = (int) x2[i];
return inds;
...
int[]quickSort(int[] x)
quick Sort
double[] x2 = new double[x.length];
int i;
for (i = 0; i < x.length; i++)
    x2[i] = x[i];
int[] inds = quickSort(x2);
for (i = 0; i < x.length; i++)
    x[i] = (int) x2[i];
return inds;
...
voidquickSort(short[] fireZoneInfo, int left, int right)
Does a quick sort on the given array
int index = partition(fireZoneInfo, left, right);
if (left < index - 1)
    quickSort(fireZoneInfo, left, index - 1);
if (index < right)
    quickSort(fireZoneInfo, index, right);
voidquicksort(String a[], int lo0, int hi0)
quicksort
int lo = lo0;
int hi = hi0;
if (lo >= hi) {
    return;
String mid = a[(lo + hi) / 2];
while (lo < hi) {
    while (lo < hi && a[lo].compareTo(mid) < 0) {
...
voidquickSort(String a[], int lo0, int hi0)
Internal recursive method to perform Quick Sort on name array.
int lo = lo0;
int hi = hi0;
String mid;
if (hi0 > lo0) {
    mid = a[(lo0 + hi0) / 2];
    while (lo <= hi) {
        while ((lo < hi0) && (a[lo].compareTo(mid) < 0))
            ++lo;
...
voidquickSort(String[] str, int low, int high)
quick Sort
if (low >= high)
    return;
String pivot = str[low];
int slow = low - 1, shigh = high + 1;
while (true) {
    do
        shigh--;
    while (collator.compare(str[shigh], pivot) > 0);
...
voidquickSort(String[] strings, int begin, int length)
This method sorts lexicographically the strings.
int i, j, leftLength, rightLength, t;
String x;
while (length >= 3) {
    t = length - 1;
    j = t + begin;
    i = (t >> 1) + begin;
    sort3(strings, begin, i, j);
    if (length == 3) {
...