public static <E extends Comparable<E>> void quickSortWirth(E[] array, int bottom, int top) {
E w;
int i = bottom;
int j = top;
E x = array[(bottom + top) / 2];
do {
while (array[i].compareTo(x) < 0)
i++;
while (array[j].compareTo(x) > 0)
j--;
if (i <= j) {
w = array[i];
array[i] = array[j];
array[j] = w;
i++;
j--;
}
} while (i <= j);
if (bottom < j)
quickSortWirth(array, bottom, j);
if (i < top)
quickSortWirth(array, i, top);
}