Question: The code provided for this assignment includes the three sort test programs that were presented in class, along with two different implementations of the selection

The code provided for this assignment includes the three sort test programs
that were presented in class, along with two different implementations of
the selection sort algorithm. The two implementations are included in header
files *selection1.h* and *selection2.h*.
The implementation in *selection1.h* works from the beginning of the array
toward the end, where each iteration selects the minimimum value element of
the remaining part of the array to be sorted, placing it in the starting
position of that part of the array.
The implementation if *selection2.h* works from the end of the array toward
the beginning, where each iteration selects the maximum value element of
the remaining part, placing it in the ending position.
## Part 1- Implement a modified selection sort
For this assignment you are to combine these two approaches, implementing
your combined approach in source file *selection3.h*.
Each iteration of the outer loop should find both the minimum and maximum
value elements of the remaining portion of the array, swap those values
with the appropriate ends of the array portion, then reduce the remaining
portion to be sorted by two.
## Part 2- Timing tests and discussion
Run timing tests on all three implementations for comparison. Report your
results in file *RESPONSES.md*.
Answer the following questions:
- Does your implementation improve on the overall run-time of the algorithm?
- What is the run-time complexity (Big Oh) of your implementation?
- Does your implementation change the run-time complexity as compared to the other two?

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!