If possible, how can I improve the following quick sort(performance wise). Any suggestions?
void main()
{
quick(a,0,n-1);
}
void quick(i
You can a eliminate recuriosn overhead by using QuickSort with Explicit Stack
void quickSort(int a[], int lower, int upper)
{
createStack();
push(lower);
push(upper);
while (!isEmptyStack()) {
upper=poptop();
lower=poptop();
while (lower
You can use better pivot selection technique such as: