Solved

The Following Implementation of QuickSort

Question 45

Multiple Choice

The following implementation of QuickSort
Static void doQuickSort(int array[ ],int start,int end) {
Int pivotPoint;
PivotPoint = partition(array,start,end) ;
DoQuickSort(array,pivot+1,end) ;
DoQuickSort(array,start,pivot-1) ;
}


A) will correctly sort the array if the partition method is written correctly
B) will give incorrect results because the two recursive calls are called in the wrong order
C) will sort the array in descending rather than ascending order
D) will be terminated by the system for making too many recursive calls

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions