Question: C++ Implement 2 sorting algorithms of your choice (for example, insertion sort, merge sort, quick sort) that operates on your linked list data structure from
C++
Implement 2 sorting algorithms of your choice (for example, insertion sort, merge sort, quick sort) that operates on your linked list data structure from the first code assignment. One is to be implemented by writing out all the code. The other is to use libraries to implement it. You can use an array of integers with a minimum of 20 integers OR your program could take two arguments, the filename of a data file, and an integer that defines the algorithm that will be used to sort. The data file contains one integer per line, for an unknown number of lines. Your program should parse this data file into your linked list structure, and then use the specified algorithm to sort the array. Your program should time how long it takes to sort the data, and report that information to the console in seconds. Take care to only report the time it takes to sort, not perform file i/o. For small dataset sizes, you may have to average several consecutive sorts in order to arrive at a valid timing measurement.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
