Program 10
Program 10
Design and implement C/C++ Program to sort a given set of n integer elements using Quick Sort
method and compute its time complexity. Run the program for varied values of n> 5000 and record
the time taken to sort. Plot a graph of the time taken versus n. The elements can be read from a file
or can be generated using the random number generator.
Program:
#include<stdio.h>
*first = *second;
*second = temp;
if (arr[j] < p)
i++;
}
}
return (i + 1);
if (l < h)
int i;
int main()
printf("\n");
quick_sort(array, 0, length-1);
print_Array(array, length);
return 0;
Output: