Computer Science, asked by haddu8061, 5 hours ago

How many linear searches will it take to find the value 7 in the list [1,4,8,7,10,28]? C. 4 b. 3 d. 5 a. 2

Answers

Answered by subhotinikam999
0

Answer:

(A) 2

Explanation:

linear searches will it take to the value of 7 is{7,28}

ans>(a) 2

I hope this is help you.

Answered by SaurabhJacob
2

C. 4 is the correct option.

  • In Linear Search, every element in the list gets checked in each iteration of the loop that is traversing every element of the list.
  • As the element 7 is at the position of 4. So, it will be searched out in the fourth iteration of the loop.
  • There are other better way of searching available such as, Binary Search.
Similar questions