Write a program that creates an array of 100 random integers in the range 1 to 200 and then, using the sequential search, searches the array 100 times using randomly generated targets in the same...


Write a program that creates an array of 100 random integers in the range 1 to 200 and then, using the sequential search, searches the array 100 times using randomly generated targets in the same range. At the end of the program, display the following statistics:


a. The number of searches completed


b. The number of successful searches


c. The percentage of successful searches


d. The average number of tests per search


To determine the average number of tests per search, you need to count the number of tests for each search. After you run your program, write a paragraph on the similarities or differences between the expected efficiency (big-O) and your calculated results.

Nov 24, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here