a modify the insertion sort function to count the number of moves needed to order an 5346198

a. Modify the insertion sort function to count the number of moves needed to order an array of 100 unique random numbers in the range from 0 to 999 (see Chapter 4 for a discussion of random numbers). Display the array 10 numbers per line before and after the sort. At the end of the program, display the total number of moves needed to sort the array.

b. Write a sequential search function to search for a number in the unsorted array created in 1a. Count the number of comparisons and display the count at the end of the search. Test the search function by searching for the number 101.

c. Improve the sequential search function to search for a number in the sorted array. Count the number of comparisons and display the count at the end of the search. Test the search function by searching for the number 101.

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now