Number of comparisons required for an unsuccessful search of an element in a…
2011
Number of comparisons required for an unsuccessful search of an element in a sequential search, organized, fixed length, symbol table of length L is
- A.
L
- B.
L/2
- C.
(L+1)/2
- D.
2L
Attempted by 217 students.
Show answer & explanation
Correct answer: A
In a sequential search, elements are examined one by one. For an unsuccessful search in a table of length L, every element must be compared to confirm the target is not present. Thus, exactly L comparisons are required.