public static void quickSortDivide(int[] a, int low, int high, int[] n) {
		
//		System.out.println("low: "+low);
//		System.out.println("high: "+high);		
//		System.out.println(Arrays.toString(a));
//		try {
//			Thread.sleep(1000);
//		} catch (InterruptedException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
		
		if (low == high) return;
		int middleValue = a[low];
		int mid = low;
		int current = low+1;
		int right = high;
		while (current<=right) {
			n[0]++;
			if (a[current]<=middleValue) {
				int t = a[current];
				a[current] = a[mid];
				a[mid] = t;
				mid = current;
				current++;
			} else {
				int t = a[current];
				a[current] = a[right];
				a[right] = t;
				right--;
			}
		}
		
		if (low<mid-1) quickSortDivide(a, low, mid-1, n);
		if (mid+1<high) quickSortDivide(a, mid+1, high, n);
		
	}