Sort an array of 10,000 elements using the quick sort algorithmas follows:
To find the current CPU time, declare a variable, say, x, oftype clock_t. The statement x = clock(); stores the current CPUtime in x. You can check the CPU time before and after a particularphase of a program. Then, to find the CPU time for that particularphase of the program, subtract the before time from the after time.Moreover, you must include the header file ctime to use the datatype clock_t and the function clock. Use a random number generatorto initially fill the array.
-
Sort the array using pivot as the
OROR