The average successful search time for sequential search on ‘n’ items is

2024

The average successful search time for sequential search on ‘n’ items is

  1. A.

    n/2

  2. B.

    (n-1) / 2

  3. C.

    (n+1) / 2

  4. D.

    log (n) + 1

Attempted by 90 students.

Show answer & explanation

Correct answer: C

Explanation:

If the search key matches the very first item, with one comparison we can terminate. If it is second, two comparisons, etc. So, average is (1+2+... +n)/n, i.e., (n+l)/2.

Explore the full course: Coding For Placement