Multiple choice technology architecture

The Worst case occur in linear search algorithm when

  1. Item is somewhere in the middle of the array

  2. Item is not in the array at all

  3. Item is the last element in the array

  4. Item is the last element in the array or is not there at all

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In a linear search, the algorithm checks each element sequentially from the beginning. The worst-case scenario occurs when the target item is at the very end of the array or not present at all, requiring a full traversal of the entire array.