Asked by Taylor Eakin on May 13, 2024
Verified
Explain how the binary search works.
Binary Search
A search algorithm that finds the position of a target value within a sorted array by repeatedly dividing in half the portion of the list that could contain the target, thereby reducing the search area.
- Explain the operation and efficiency of binary search.
Verified Answer
SC
Strawberry Chaila TolentinoMay 16, 2024
Final Answer :
Binary search works on arrays that are ordered.It computes the midpoint of the array and determines which half the search key lies in.It continues in this manner until either the search key is located or not found.
Learning Objectives
- Explain the operation and efficiency of binary search.