27.3k views
4 votes
in an average case involving an array of n elements, how many times will a linear search function have to read the array to locate a specific value?

1 Answer

2 votes

Answer:

O(n), if the element is the last one in the list, it would be n

Step-by-step explanation:

linear mesns jt grows with the list which gives it O(n) compmexity... if the item is the first element =1 , last = n

User George Mauer
by
8.6k points

No related questions found