public void mergesort(int[] A, int left, int right) {
		// O(nlogn)
		// worst-case O(nlogn)
		if (left < right) {
			int mid = left + (right - left) / 2;
			mergesort(A, left, mid);
			mergesort(A, mid + 1, right);
			merge(A, left, mid, right);
		}
	}