(Choose 1 answer)
Partitioning is a technique used in quicksort. The following is a partition pseudocode for sorting from smallest to largest:
partition the array a from index low to index up x:= a[low], i=low, j=up do increase i and stop at i, where a[i]>x decrease j and stop at j, where a[j]<=x swap a[low] with a[j]Consider the list of eight integers (n=8) below:6, 4, 9, 10, 8, 3, 7, 5 What is the list after it is partitioned with low = 0 and up = n-1?
if(i<j) swap a[i] with a[j]while(i<j)
A. 3, 4, 5, 6, 7, 8, 10, 9
B. 3, 4, 5, 6, 8, 7, 9, 10
C. 3, 4, 6, 5, 8, 10, 7, 9
D. 3, 4, 5, 6, 8, 10, 7, 9
Exit 30