]
return result
print MergeSort([1, 2, 5, 6,right):
r, l=0, 3, 4:])
return Merge(left;= 1:
result.append(right[r])
r += 1
result += right[r:]
result+= left[l:
return lists
num = int( len(lists)/len(left) and rlen(right)def MergeSort(lists);2 )
left = MergeSort(lists[:num])
right = MergeSort(lists[num:
if len(lists) lt.append(left[l])
l += 1
else, 0
result=[]
while llt:
if left[l] right[r]:
result, right)
def Merge(left
]
return result
print MergeSort([1, 2, 5, 6,right):
r, l=0, 3, 4:])
return Merge(left;= 1:
result.append(right[r])
r += 1
result += right[r:]
result+= left[l:
return lists
num = int( len(lists)/len(left) and rlen(right)def MergeSort(lists);2 )
left = MergeSort(lists[:num])
right = MergeSort(lists[num:
if len(lists) lt.append(left[l])
l += 1
else, 0
result=[]
while llt:
if left[l] right[r]:
result, right)
def Merge(left