Create an array of random numbers within the range -99 to 99 of a given size. Sort it using the selection sort algorithm. Sort the same array using the heap sort algorithm. If the size of the array is less than or equal to 100, print the arrays before and after sorting (for both selection and heapsort). Change both algorithms to keep track of the number of data comparisons and data moves. Save these results. Repeat the process with other arrays. Then write the short report to compare the results. Suggested arrays sizes for testing: 10 10 100 100 1000 1000 10000 10000 100000 100000.
Get Free Quote!
255 Experts Online