MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / mergeSort

Function mergeSort

Python/all sorting methods.py:110–116  ·  view source on GitHub ↗
(customList, l, r)

Source from the content-addressed store, hash-verified

108
109
110def mergeSort(customList, l, r):
111 if l < r:
112 m = (l+(r-1))//2
113 mergeSort(customList, l, m) #T(n/2)
114 mergeSort(customList, m+1, r) #T(n/2)
115 merge(customList, l, m, r)
116 return customList
117
118# cList=[2,1,3,6,9,7,4,8,5]
119# print(mergeSort(cList ,0 ,8))

Callers

nothing calls this directly

Calls 1

mergeFunction · 0.70

Tested by

no test coverage detected