Which data structure naturally supports binary search when its elements are maintained in sorted order?

Options

  • A. Sorted array
  • B. Unordered linked list
  • C. Stack
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. Sorted array

Detailed Explanation

A sorted array naturally supports binary search because its elements can be accessed directly using an index. Binary search needs to examine the middle element repeatedly, and arrays provide O(1) random access. A linked list does not provide efficient random access to its middle element, so the usual binary-search advantage is lost. Therefore, sorted arrays are a standard implementation environment for binary search.