Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

how many comparisons will be made to find 8 in this list using a linear…

Question

how many comparisons will be made to find 8 in this list using a linear search? 1, 8, 15, 12, 16, 3, 8, 10

Explanation:

Step1: Start linear search

In linear search, we check elements one - by - one. First element is 1, not 8.

Step2: Check second element

Second element is 8. We found the target.

Answer:

1