#!/usr/local/bin/python3 # Author: Dr. Robert Heckendorn, Computer Science Department, University of Idaho, 2013 def merge(x) : return mergeaux(x, 0, len(x)) def mergeaux(x, start, end) : print((start, end)) if end-start<=1 : # return the list of one item print("x") return [x[start]] else: pivot = ((end-1)+start)//2 # sort left and right halves left = mergeaux(x, start, pivot+1) right = mergeaux(x, pivot+1, end) # merge the results until one list is empty l = 0 r = 0 ans = [] while l