Comparison between Linear and Binary Search Algorithm
Before comparing let's learn what exactly is linear search and binary search algorithm
Linear Search Algorithm
An algorithm to find if a certain element exists in a given array or not.
Linearly iterate the array to find the required element.
It h...
pranshavslearning.hashnode.dev2 min read
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.