Analyze the average-case performance of the linear search algorithm, if exactly half the time the element x is not in the list and if x is in the fist it is equally likely to be in any position.

In this question we have to analyze the average case performance of the linear search algorithm.

Step 1 </p>

Case 1

If exactly half the time the element x is not in the list

Since the element is not in the list it’s complexity is