In which of the search algorithm the elements should be in sorted order?
Answers
Answered by
1
Answer:
Binary Search Algorithm
Explanation:
Binary Search is used to find a given key element only in a sorted array.
In this search type, the middle value of the given array is found and then it is compared with the given key element from the user.
If the given key element is less than the middle value then the left is subtracted by 1 while if the key element is more than the middle value then right is added by one.
Hope This Helps You!
Similar questions