Multiple choice

Which of the following statements best explains the processing of a sequential search?

  1. It searches an array by starting at the middle and working out in both the directions.

  2. It compares adjacent array elements, exchanging them if they are out of order.

  3. It searches an array from beginning to the end, until the specified element is located.

  4. It combines two sorted arrays into a single sorted array.

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

Sequential search, also called linear search, examines each element in order from the beginning until it finds the target or reaches the end. It's simple but relatively slow for large lists. Unlike binary search, it doesn't require the list to be sorted beforehand.