Which of the following conditions must be true to apply the binary search…

2025

Which of the following conditions must be true to apply the binary search technique effectively?

  1. A.

    The data should be organised in a heap-based structure.

  2. B.

    The list or array must be arranged in a sorted sequence.

  3. C.

    This method can be used exclusively with data stored in linked list form.

  4. D.

    The algorithm executes in the same amount of time no matter how large the input is.

Attempted by 60 students.

Show answer & explanation

Correct answer: B

Binary search is an efficient algorithm designed to find an element's position in a collection by repeatedly dividing the search interval in half. For this logic to work, the collection must be sorted (either in ascending or descending order).

When you check the middle element, a sorted order guarantees that if your target is smaller than the middle element, it must lie in the left half, and if it is larger, it must lie in the right half. Without a sorted sequence, eliminating half of the remaining elements at each step is mathematically impossible.

Explore the full course: Rssb Senior Computer Instructor