Which of the following search algorithms requires a sorted array?

2022

Which of the following search algorithms requires a sorted array?

  1. A.

    Linear search

  2. B.

    Hash search

  3. C.

    Binary search

  4. D.

    All of these

Attempted by 1182 students.

Show answer & explanation

Correct answer: C

Binary search works only on sorted arrays. It repeatedly divides the array into halves and compares the middle element with the target value.

Explore the full course: Up Lt Grade Assistant Teacher 2025