Which of the following techniques is used to reduce the time required for searching an element in a sorted array?

Options

  • A. Sequential scanning
  • B. Binary search
  • C. Bubble sort
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Binary search

Detailed Explanation

Correct Answer: B. Binary search

Explanation: Binary search reduces the search space by half in every iteration.

  • It requires the array to be sorted.
  • It compares the target with the middle element.
  • Its time complexity is O(log n), compared with O(n) for linear search.