Question: Load 150 random ordered values from a file into an array. Execute a linear search on the array utilizing 5 values entered by the user.
Load 150 random ordered values from a file into an array. Execute a linear search on the array utilizing 5 values entered by the user. The values searched for should be values which are in the array. The number of compares (to find each value searched for) must be counted by the program. Then, search for another 5 values input by the user, which are NOT in the array. Once again the number of compares to NOT find the values in the list must be counted by the program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
