问题 I came across the following implementation of the mergeSort algorithm: def merge_sort(x): merge_sort2(x,0,len(x)-1) def merge_sort2(x,first,last): if first < last: middle = (first + last) // 2 merge_sort2(x,first,middle) merge_sort2(x,middle+1,last) merge(x,first,middle,last) def merge(x,first,middle,last): L = x[first:middle+1] R = x[middle+1:last+1] L.append(999999999) R.append(999999999) i=j=0 for k in range(first,last+1): if L[i] <= R[j]: x[k] = L[i] i += 1 else: x[k] = R[j] j += 1 x =