Back to the 2022 paper

Module 1: Introduction and Complexity Analysis

20222m

In linear search algorithm the worst case occurs when:

  • (i) the item is somewhere in the middle of the array
  • (ii) the item is not in the array at all
  • (iii) the item is the last element in the array
  • (iv) the item is the last element in the array or is not there at all

Similar questions