MCPcopy Index your code
hub / github.com/hustcc/JS-Sorting-Algorithm / mergeSort

Function mergeSort

src/pythonSortTest.py:78–84  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

76
77
78def mergeSort(arr):
79 import math
80 if (len(arr) < 2):
81 return arr
82 middle = math.floor(len(arr) / 2)
83 left, right = arr[0:middle], arr[middle:]
84 return merge(mergeSort(left), mergeSort(right))
85
86
87def merge(left, right):

Callers

nothing calls this directly

Calls 1

mergeFunction · 0.70

Tested by

no test coverage detected