Yes, the array must be sorted in order to use binary search and for that, we would first have to sort the array using any of the sorting algorithms such as bubble sort, selection sort etc. But even after all that it would be faster than linear search if we use an optimised sorting algorithm!
Amr Shams
if I don't have the answer to your question. give me enough time and I will figure it out
That's excellent, but I have to mention that there is a prerequisite for binary search to be implemented in the given array- which is clearly is this the array should be in non-decreasing or non-increasing order. and that in most cases not applicable.