Order Agnostic Binary search is used when the user has no idea whether the given array is sorted in ascending or descending order then by comparing the first and last element of the array, we can get to know whether the given array is in ascending or descending order.
Order Agnostic Binary search is used when the user has no idea whether the given array is sorted in ascending or descending order then by comparing the first and last element of the array, we can get to know whether the given array is in ascending or descending order.