Question: CSC421 Assignment 4 (50 Points) Student Name: Student ID: Complete the following program named my Quicksort epp to sort and display a random integer array.

 CSC421 Assignment 4 (50 Points) Student Name: Student ID: Complete the

CSC421 Assignment 4 (50 Points) Student Name: Student ID: Complete the following program named my Quicksort epp to sort and display a random integer array. You need to compile and run your program using the con c++ -o myQuicksort myQuicksort.cpp center myQuicksort n center Where 0-n is the number of random integers in the integer array. myQuicksort.cpp #include #include # include # include using namespace std // array class "! pointer to body /l size of body // quick sort class myArray ( int ptr int size, void quickSort(int, int, int) public myArray(int) -myArray0(free(ptr):) void sortOfquick Sort(ptr, 0, size-):) void display(int) /f constructor // destructor l/ sort elements /l display elements void myArray:quickSont(int al], int I, int n)0 // to be implemented myArray:myArray(int s)( I/ constructor ptr- (int *) malloc(s sizeof(int)) size s srand(unsigned) time(NULL); for int i-O, iksize, i++) Il set random seed // 0sptrlils255 /l display, m elements per line ptr(i)-rand()%256; void myArray: display(int m) coutsc" Array Elements:"endl

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!