Question: please help me with the codes and please explain to me how to put the data in excel and create graphs Write a computer program
please help me with the codes and please explain to me how to put the data in excel and create graphs
Write a computer program that prompts the user for a number, creates an array for that number of random integers, and then uses the bubble sort to order the array. The program should print out the array prior to the call to the sorting algorithm and afterwards. write the program in C#.
Repeat 1 but use selection sort this time.
1 and 2 are primarily intended to make sure that your algorithms work.
Once you are convinced your programs work, do the following
Write a computer program that prompts the user for two numbers, n for the number of items in the array to sort, and num_i for a number of arrays of this size to sort. Then do the following:
Initiate a variable running_time to 0
Create a for loop that iterates num_i times.
In the body of the loop,
Create an array of n random integers
Get the time and set this to start-time. You will have to figure out what the appropriate command is in the programming language you are using to find them time
Use bubble sort to sort the array
Get the time and set this to end-time
Subtract end-time from start-time and add the result to running_time
Once the program has run, note
The number of items sorted
The number of iterations
The average running time for each size array
Repeat the process nine times, using 50, 250 and 500 as the size of the array, and 100, 1000 and 10,000 as the number of arrays of each size to sort.
Repeat 3 using selection sort.
Create a spreadsheet showing the results of 3 and 4 and create a graph to graphically represent the information Show both sort algorithms on the same graph for comparison.
Write a one page document explaining the results, bearing in mind that both algorithms have a complexity of O(n^2) and what you know about complexity analysis. Use your knowledge of complexity analysis to explain your results.
Please submit
Program code for 1
Program code for 2
Program code used in 3 and the results of the nine program runs
Program code used in 4 and the results of the nine program runs
The spreadsheet created in 5
The report. In the report, say which machine you ran the experiments on (type of processor, RAM, etc).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
