which of the following is not an application of binary search
Answers
Answered by
0
Answer:
In binary serch the elements in the list should be shorted.It is applicable only for ordered list. Hench binary search is unordered list is not an application.
Answered by
0
The elements in the list should be ordered in Binary search. It is only applicable to ordered lists. As a result, binary search in an unordered list is not a useful application.
Explanation:
- Binary search is a fast method of locating a specific item in a sorted list. It works by dividing the portion of the list that could hold the item in half until there's only one viable position left.
- There's no way to use binary search if the list of items isn't sorted, because the list's median value might be anywhere, and if the list is split into two halves, the element you're looking for could be cut off.
- Begin by sorting an array in ascending order.
- Each phase should include the following: Compare the middle element of the array m to the middle member of the array e. If the element values are equal, return m's index. If e exceeds m, then e must be in the left subarray.
- Repeat the procedure with a fresh subarray.
Similar questions