Java Utililty Methods Array Sort

List of utility methods to do Array Sort

Description

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

Method

voidsort(int values[])
Sort an array of integers to place them in increasing order
q_sort(values, 0, values.length - 1);
voidsort(int[] array)
sort
privateSort(array, 0, array.length - 1);
voidsort(int[] array)
sort
Arrays.sort(array);
int[]sort(int[] array)
Sorts a given array of integers in ascending order and returns an array of integers with the positions of the elements of the original array in the sorted array.
int[] index = new int[array.length];
int[] newIndex = new int[array.length];
int[] helpIndex;
int numEqual;
for (int i = 0; i < index.length; i++) {
    index[i] = i;
quickSort(array, index, 0, array.length - 1);
...
voidsort(int[] array)
sort
quickSort(array, 0, array.length - 1);
voidsort(int[] array)
Sort the array.
int min = array[0], max = array[0];
for (int value : array) {
    if (value < min) {
        min = value;
        continue;
    if (value > max) {
        max = value;
...
int[]sort(int[] array)
Sorts a given array of integers in ascending order and returns an array of integers with the positions of the elements of the original array in the sorted array.
int[] index = initialIndex(array.length);
int[] newIndex = new int[array.length];
int[] helpIndex;
int numEqual;
quickSort(array, index, 0, array.length - 1);
int i = 0;
while (i < index.length) {
    numEqual = 1;
...
int[]sort(int[] asd)
sort
int[] sorted = asd.clone();
for (int i = 0; i < sorted.length; i++) {
    for (int j = i + 1; j < sorted.length; j++) {
        if ((sorted[i] > sorted[j]) && (i != j)) {
            int temp = sorted[j];
            sorted[j] = sorted[i];
            sorted[i] = temp;
return sorted;
voidsort(int[] idxs, double[] values)
Sort an integer array of indices based on values Updates indices in place, keeps values the same
sort(idxs, values, 500);
voidSort(int[] in)
Sort
Arrays.sort(in);