You will need to implement several functions and use one makefile to generate an execution file called OrderArray, which orders numbers in an array.
The process for the algorithm is as follows:
1. Pick a random element from the array as a reference.
2. Splitting: rearrange the array so that all values greater than the reference will be placed after that and those less than the reference will come before it.
3. The above steps should be recursively and separately applied to both sub-arrays (greater values and smaller values
than the reference). Stop whenever the array size is one or less.
List of Functions
- RandomGeneration.c - This function generates a random number in the range of the array size, and print the random element (reference) from the array then return the index of such element. The input is an array and it returns the random index.
Note: the array index starts from 0.
For example, for an array with size 5, if the generated random number is 3, the function
should return 3 and print the fourth element as reference.
- PrintArrays.c - This function print an array.
- Split.c This function gets the reference and performs the splitting step mentioned above (step 2). The inputs include an array, starting index and ending index.
- Recursive.c: This function recursively applies the splitting on both subarrays as explained in step 3. The inputs include an array, starting index and ending index.
- Main.c: The entry point of the entire program, which takes in an array of integers (it can be hard-coded in the main function), order them (using the above functions) and print the array.
Please see attached for the exact output.
25 freelancers are bidding on average $37 for this job
Hi, I have read and understood you requirement completely. In short you were askimg to implement quicksort. Also, if you will award project to me you will get plagiarism free code. Regards, Sneha
Hahve more than 10+ years of C application programming experience in some of the worlds topmost software companies. Stay tuned, I'm still working on this proposal.
price is negotiabe Relevant Skills and Experience i have done many projects in c++ and c as i am computer science graduate and a coder now a days Proposed Milestones $35 USD - 1
I have been coding in C and C++ for years now and let me tell you that this really is a basic program for me. I can give you a perfect working executable in almost a day !
I'm so excited to work with you and I have a big experience with c programming and I'm sure that you gonna be so happy in the last so let's work together