Question: Objectives: Learn and practice Sorting Algorithms and their Efficiency. Submission: Zipped file Lab 5 _ StudentID.zip, including: Lab 5 . cpp Lab 5 _ report.docx,

Objectives:
Learn and practice Sorting Algorithms and their Efficiency.
Submission:
Zipped file Lab5_StudentID.zip, including:
Lab5.cpp
Lab5_report.docx, including
screenshot(s) of sample runs.
Comments, and references.
Lab Tasks:
Write a C++ function for Quick Sort (You can use the sample code from Moodle or from another resource, mentioning in your report)
Add two counters to the function of Quick Sort, that count the number of comparisons and the number of swaps that are made.
Display the following information:
a. Total counts of comparisons
b. Total counts of swaps
Write a main() function to test a worst, and an average cases in terms of time efficiency.
a. Fill out the array with random numbers for an average case.
b. Fill out the array with selected numbers for the worst case.
c. Make sure to test with more than 10 numbers, too little data set would not see significance.
 Objectives: Learn and practice Sorting Algorithms and their Efficiency. Submission: Zipped

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!