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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started