Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Here is the project for the Data Structures and Algorithms course. You are required to optimize the quicksort program provided above based on the following
Here is the project for the Data Structures and Algorithms course. You are required to optimize the quicksort program provided above based on the following issues.
Starting with the C code for Quicksort given in this chapter, write a series of Quicksort implementations to test the following optimizations on a wide range of input data sizes. Try these optimizations in various combinations to try and develop the fastest possible Quicksort implementation that you can.
a Look at more values when selecting a pivot.
b Do not make a recursive call to sort when the list size falls below a given threshold, and use Insertion Sort to complete the sorting process.
Test various values for the threshold size.
c Eliminate recursion by using a stack and inline functions.
A zip file which includes:
A cpp file that includes four implementations of the quicksort algorithm: the original implementation,
the optimized sorting algorithm after a the sorting algorithm optimized after both a and b and the sorting algorithm optimized after ab and c
A text file describing the runtime of four programs in milliseconds.
for example: original:
ms
a :
ms
ba:
ms
cba : ms
Some screenshots of the results of your program's execution.
Your program should sort a dataset of one million entries.
You need to generate a batch of random data, use the four quicksort programs you implemented to sort this data.
If your dataset is not one million entries, then I will deduct points from your score.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started