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

Function quickSort

Python/all sorting methods.py:135–140  ·  view source on GitHub ↗
(customList ,low ,high)

Source from the content-addressed store, hash-verified

133 return (i+1)
134
135def quickSort(customList ,low ,high):
136 if low < high:
137 pi = partition(customList ,low ,high) #O(n)
138 quickSort(customList ,low ,pi-1) #T(n/2)
139 quickSort(customList ,pi+1 ,high) #T(n/2)
140 #combined = O(N LogN)
141
142# cList=[2,1,3,6,9,7,4,8,5]
143# quickSort(cList ,0 ,8)

Callers

nothing calls this directly

Calls 1

partitionFunction · 0.70

Tested by

no test coverage detected