CSC230 Lab 12

$30.00

Category: Tags: , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (3 votes)

Goal: This lab will help practice quick sort algorithm.
Our lecture discussed Quick Sort algorithm. In this lab, please implement quick sort
algorithm in lab12.cpp file. This executable file reads integers from an input file, which is
given at command line. The imported integers are stored in an internal int array. You can
make the array size to be 5000. In other words, we assume the input data file can have at
most 5000 integers. After importing the integers from the data file, the main() function
calls the quick sort function, then main() function prints out the result.
Three data files are provided in this lab. They are test, test100.txt, and test200.txt. The file
test has only 14 integers. I suggest you use test file to debug the code.
Once you finish the coding, type the following command to compile it.
g++ lab12.cpp –o lab12
The execution result of test.cpp is:
jikaili$ ./lab12 test
Quick Sort Result is:
12
32
33
43
54
75
78
234
243
312
543
636
8567
8976
Your implementation must have the exactly same result.
Wrap up
————————
Jar you C++ files and the downloaded data files into lab12.jar. Submit the completed file to
Canvas.