private void quicksort(int[] source, int left, int right) {

        if (right - left <= 1)
            return;

        int pivot = source[left];
        int i = left + 1;//cause 1 is a pivot. Otherwise this should be changed.

        for (int j = left + 1; j < right; j++) {
            if (pivot > source[j]) {
                int tmp = source[j];
                source[j] = source[i];
                source[i] = tmp;
                i++;
            }
        }

        int tmp = source[left];
        source[left] = source[i - 1];
        source[i - 1] = tmp;


        quicksort(source, left, pivot);
        quicksort(source, pivot + 1, source.length);
    }