Reference no: EM133381301
Programming- Run Time Observation
Overview
This project is to implement two sorting algorithms. The first sorting algorithm is an ??(??2) algorithm: either Selection Sort or Insertion Sort or Bubble Sort. The second algorithm is Quicksort. Your Quicksort algorithm must use the median-of-three method to determine the pivot, and must use the Hoare Partition algorithm (both described in the book and slides). With all of this done, you will be asked to gather some data about the running time and plot it.
Requirements
You must implement the two sorting algorithms above. They should sort the numbers in ascending order (smallest to largest). When you submit your project, you must have functioning code for both sorting algorithms, but you can comment out the lines in your main method which actually do the sorting (so I can uncomment a single line to switch the sorting algorithm). If you'd like, you can ask the user which sorting algorithm and do it that way.
You must also have a method/function confirmSorted(). This function should take your array of numbers, verify that it is sorted in ascending order, and return a Boolean. If the numbers are
confirmed to be sorted, print out "Confirmed sorted" and if they aren't sorted, print out "Confirmed NOT sorted". Do this before and after the sort.
Data analysis
In addition to your code, you'll be asked to try out each sorting algorithm will datasets of different sizes and record the running time (in milliseconds). With this data, you should create a table and
graph like the one below. In a paragraph or two, please write what you've discovered with this data,
explain what is happening with the data and why.
You will be provided with datasets of the following sizes: 10, 100, 1000, 5000, 10000, 25000, 50000,
75000, 100000, 250000, 500000, 750000, 1000000, and 10000000. Please include results for all
these datasets in your analysis. Some combinations of algorithm and dataset size won't be feasible
and may be excluded (the slower algorithm will start to take a VERY long time with large datasets).
Extra credit:
Implement the classic Merge Sort algorithm and compare the usage of the memory between Merge Sort and Quick Sort (or one of the basic sorting algorithms)
Examine toll chronic-communicable diseases have on morbidity
: Examine the toll that chronic and communicable diseases have on morbidity and mortality rates as well as the role for early detection and prevention.
|
Regular exercise to develop physical fitness
: A combination of physical activity and lecture providing regular exercise to develop physical fitness - What did you enjoy about each of the three classes
|
Determine average unit cost of eight units using
: Determine the average unit cost of eight units using the cumulative average time approach. (Do not round intermediate calculations.) If the component can be
|
How would you characterize sharon behavior
: How would you characterize Sharon's behavior? How would you characterize Michael's behavior?
|
Implement two sorting algorithms
: Cleveland State University - implement two sorting algorithms. The first sorting algorithm is an ??(??2) algorithm: either Selection Sort or Insertion Sort
|
Explain the concepts of risk aversion and loss aversion
: Explain the concepts of "risk aversion" and "loss aversion" as you would explain them to an elderly relative, e.g., your grandparent, who has no knowledge
|
Problem based on the case study-healing and autonomy
: Based on the "Case Study: Healing and Autonomy" and other required topic Resources, you will complete the "Applying the Four Principles: Case Study".
|
Which of the following standards of ethical conduct
: Management accountants are required by the Institute of Management Accountants (IMA) to obtain a certain number of continuing professional education (CPE) hours
|
How would you work with other professionals
: How would you work with other professionals, if in addition to her substance abuse, you believed she struggled with depression, anxiety, PTSD, gambling,
|