Question: ( Please use Javascript ) For this project, I need to produce a large data set to time different sorting algorithms. You must implement and

(Please use Javascript)
For this project, I need to produce a large data set to time different sorting algorithms. You must implement and test the following algorithms.
Bogo Sort
Bubble Sort
Selection Sort
Insertion Sort
Merge Sort
Quick Sort
We want to test sorting algorithms with different sets of data.
For each of the algorithms above, create arrays of the following sizes.
1...10,steps of 1.
10...100,steps of 10.
100...1000steps of 100.
1000...10,000steps of 1000.
10,000...100,000steps of 10,000.
100,000...1,000,000steps of 100,000.
1,000,000...10,000,000steps of 1,000,000.
10,000,000...100,000,000steps of 10,000,000.
Then fill the arrays with numbers and sort them using the algorithms above.
I don't have to run the program if it takes more than 2minutes to complete a particular sort. That is to say, don't do all the sets. If an algorithm (like bubble sort and bogo sort)takes more than 2minutes to sort 10,000numbers, then that can be considered the largest set you can reasonably sort.
For each sort, record the time that the program takes to complete the work. Record this time, along with the number of items that were to be sorted, and the properties of the data (see below)into a CSV file.
Based on the size of the arrays, above, you will have 80different sorts for each of the algorithms. But we're going to add three different features to each algorithm. So we'll have 80sorts *6algorithms *3array characteristics =1440different sorts to be completed. The array characteristics are as follows.
Sorted (sorted in ascending order).
A randomly ordered array.
Reverse sorted (sorted in descending order).
Your CSV file will look something like this...
Algorithm
Size of Array
Time (seconds)
Characteristic
Bogo
10
100
random
Bogo
20
120
random
Selection
100
20
random
Selection
200
40
random
Quicksort
1000000
20
random
This is just to give you the flavor. Yours should be much more consistent and ordered...

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 Programming Questions!