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
ORiginal work QUESTIONS
January 22, 2019
Determine whether diversion programs are only beneficial to offenders charged with misdemeanors and non-violent felonies
January 22, 2019

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

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.

 

Looking for a Similar Assignment? Order now and Get 20% Discount!
Use Code; GET20

WhatsApp Chat with us on Whatsapp