93.3k views
0 votes
In an average case involving an array of n elements, how many times will a sequential search function have to read the array to locate a specific value

User Ilkdrl
by
5.6k points

1 Answer

0 votes

Answer:

n/2 times

Step-by-step explanation:

The number of times a sequential search function will have to read the array in other to locate a specific value is : n/2 times

In an average case to locate a specific value using the a sequential/linear search the elements of the array will be searched in other to get a specific value and this will take n/2 number of attempts/times.

a sequential search is used to search for a value contained in a data set that has a linear relationship with other values contained in the data set

User Robyn
by
6.4k points