private static int[] mergeSort(int[] A, int l, int r){
		if(r-l<1) return new int[]{A[r]};
		int mid = (l+r)/2;
		int[] leftSorted = mergeSort(A, l, mid);
		int[] rightSorted = mergeSort(A, mid+1, r);
		return merge(leftSorted,rightSorted);
	}