Question: Hi, I need to create a program in C that meets the following requirements but I'm lost on how to do it. 1) Create an

Hi, I need to create a program in C that meets the following requirements but I'm lost on how to do it.

1) Create an array of size 20 and initialize it with random numbers between 1-100. 2) Sort the array using Insertion Sort, and print out the sorted array and the time it took your algorithm to sort it (in milliseconds). 3) Sort the original array again, this time using Selection Sort, and print out the sorted array and the time it took your algorithm to sort it (in milliseconds). 4) Sort the original array again, this time using Bubble Sort, and print out the sorted array and the time it took your algorithm to sort it (in milliseconds). 5) Divide the original array into 2 arrays of size 10, and sort the array again, this time using Merge Sort, and print out the sorted array and the time it took your algorithm to sort it (in milliseconds).

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!