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

Function quickSort

src/pythonSortTest.py:101–108  ·  view source on GitHub ↗
(arr, left=None, right=None)

Source from the content-addressed store, hash-verified

99
100
101def quickSort(arr, left=None, right=None):
102 left = 0 if not isinstance(left, (int, float)) else left
103 right = len(arr) - 1 if not isinstance(right, (int, float)) else right
104 if left < right:
105 partitionIndex = partition(arr, left, right)
106 quickSort(arr, left, partitionIndex - 1)
107 quickSort(arr, partitionIndex + 1, right)
108 return arr
109
110
111def partition(arr, left, right):

Callers

nothing calls this directly

Calls 1

partitionFunction · 0.70

Tested by

no test coverage detected