public void quickSort(int lowerIndex, int higherIndex) {          
	        int i = lowerIndex;
	        int j = higherIndex;

	        int pivot = array[lowerIndex+(higherIndex-lowerIndex)/2];

	        // Divide into two arrays and partition step
	        while (i <= j) {
	            while (array[i] < pivot) {
	                i++;
	            }
	            while (array[j] > pivot) {
	                j--;
	            }
	            if (i <= j) {
	                swap(i, j);
	                //move index to next position on both sides
	                i++;
	                j--;
	            }
	        }
	   	    
	        if (lowerIndex < j)
	            quickSort(lowerIndex, j);
	        if (i < higherIndex)
	            quickSort(i, higherIndex);
	    }