To efficiently search for an element in an array, we can use ___________ algorithm.

  • Linear
  • Binary
  • Bubble
  • Merge
The correct option is "Binary." Binary search is an efficient algorithm used to locate a specific element within a sorted array. It follows a divide-and-conquer approach, repeatedly dividing the search interval in half until the target element is found or the interval is empty. Compared to linear search (which checks every element sequentially), binary search is much faster for large sorted arrays, making it a preferred choice for efficient searching operations.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *