Info
Warning
Danger
/ Homework Answers / Computer Science / Question Description: Testing Variations Quicksort (Using The Module Two and Three

Question : Question Description: Testing Variations Quicksort (Using The Module Two and Three

Question

Description: Testing Variations on Quicksort (Using The Module Two and Three Readings) Following up on our Module 2 assignment where we examined the performance of three sorting algorithms, we are going to look more closely at one of them quicksort. Quicksort is a widely used sorting algorithm. However, it has some drawbacks. It sometimes does not perform well, depending on the nature of the list ht been many variations that attempt to get around these shortcomings. ]. Since the algorithm's publication there have Wi In this program we will look at three variations of quicksort We will compare them on ten randomly generated lists of 1000 items. In addition, we will look at the algorithms' performance on both a sorted and reverse sorted (sorted highest to lowest) version of each list. We wil look at the behavior of three different versions of quicksort on randomly generated lists of size 1000 The three versions of quicksort are described below Randomly generate integers in the range 0-99 for your random numbers. You may choose your own random number generation technique (this is an exception to the no-outside-help requirement for this assignment. You must document the source of your random number generation in the code. " Here is what your code should do: 1. Do this 10 times: Generate a random list of 1000 items. Make a sorted version of the list. Use whatever sort you want to do this. You do not need to demonstrate, annotate, etc. this sort. Make a reverse-sorted (i.e. high to low) version of the list Modify whatever sort you want to do this. You do not need to demonstrate, annotate, etc. this sort. Have each version of quicksort sort each of the three lists. Give the original list, the sorted list, and the number of comparisons done by each version of the algorithm. a. b. c. d. e. 2. At the end: For each quicksort version and each list type (random, pre-sorted, reverse- sorted) give the average of the number of comparisons. a.

 

Solution
5 (1 Ratings )

Solved
Computer Science 4 Months Ago 5 Views
This Question has Been Answered!
Premium Content -

Unlimited Access

Explore More than 2 Million+
  • Textbook Solutions
  • Flashcards
  • Homework Answers
  • Documents
Signup for Better Grades!

Ask an Expert

Our Experts can answer your tough homework and study questions
154049 Computer Science Questions Answered!
Post a Question