Should Binary Search be applied on an Unsorted Array?

It can be seen from the workaround that using binary search takes more time compared to linear search and also uses extra space. 

So it is Not Recommended to use binary search for an unsorted array.



Can Binary Search be applied in an Unsorted Array?

Binary Search is a search algorithm that is specifically designed for searching in sorted data structures. This searching algorithm is much more efficient than Linear Search as they repeatedly target the center of the search structure and divide the search space in half. It has logarithmic time complexity i.e. O(log N).

Now, the question arises, is Binary Search applicable to unsorted arrays?

So, the answer is NO, it is not possible to use or implement Binary Search on unsorted arrays or lists, because, the repeated targeting of the mid element of one half depends on the sorted order of data structure.

Similar Reads

Workaround to apply binary search in an unsorted array:

However, if there is a need to do so explicitly then:...

Should Binary Search be applied on an Unsorted Array?

...