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

computer science

Description

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.


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.