Binary search explained:

Binary search is one of the highly efficient search algorithm with a complexity of log(n) as here we divide the target array to half n/2 each time till we get the target item , so for an array of size 8 . we get the element with in 3 operation.

Note that binary search can be carried out only for a sorted array so it wont be always the best algorithm to use.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Praveen David Mathew

Praveen David Mathew

An ISTQB certified Software Test Engineer and an enthusiastic fast learner with a passion for technology. linkedin : https://www.linkedin.com/in/praveendvd