MCPcopy Create free account
hub / github.com/bregman-arie/devops-exercises / merge_sort

Function merge_sort

coding/python/merge_sort.py:7–13  ·  view source on GitHub ↗
(arr: List[int])

Source from the content-addressed store, hash-verified

5
6
7def merge_sort(arr: List[int]) -> List[int]:
8 if len(arr) <= 1:
9 return arr
10 mid = len(arr) // 2
11 left = merge_sort(arr[:mid])
12 right = merge_sort(arr[mid:])
13 return merge(left, right)
14
15
16def merge(left: List[int], right: List[int]) -> List[int]:

Callers 1

mainFunction · 0.85

Calls 1

mergeFunction · 0.85

Tested by

no test coverage detected