Question: Which XXX completes the Python partition ( ) function used by quicksort? def partition ( numbers , start _ index, end _ index ) :

Which XXX completes the Python partition() function used by quicksort?
def partition(numbers, start_index, end_index): midpoint = start_index +(end_index - start_index)//2 pivot = numbers[midpoint] low = start_index high = end_index done = False while not done: while numbers[low]< pivot: low = low +1 while pivot < numbers[high]: high = high -1 XXX: done = True else: temp = numbers[low] numbers[low]= numbers[high] numbers[high]= temp low = low +1 high = high -1 return high
a) if numbers[low]> numbers[high]
b) if numbers[low]< numbers[high]
c)if low >= high
d) if low < high

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!