MCPcopy Create free account
hub / github.com/geekcomputers/Python / _quick_sort

Function _quick_sort

Sorting Algorithms/quick_sort.py:28–33  ·  view source on GitHub ↗
(items, low, high)

Source from the content-addressed store, hash-verified

26def quick_sort(nums):
27 # Create a helper function that will be called recursively
28 def _quick_sort(items, low, high):
29 if low < high:
30 # This is the index after the pivot, where our lists are split
31 split_index = partition(items, low, high)
32 _quick_sort(items, low, split_index)
33 _quick_sort(items, split_index + 1, high)
34
35 _quick_sort(nums, 0, len(nums) - 1)
36

Callers 1

quick_sortFunction · 0.85

Calls 1

partitionFunction · 0.70

Tested by

no test coverage detected