Binary search using Java

Binary search algorithm use to search from a big list of data. Binary search algorithm use divide and conquer method. The binary search algorithm begins by comparing the target value to the value of the middle element of the sorted data list. If the target value is equal to the middle element's value, then the position is returned and the search is finished. If the target value is less than the middle element's value, then the search continues on the lower half of the array; or if the target value is greater than the middle element's value, then the search continues on the upper half of the array. And Process continue.


https://www.geekboots.com/java/binary-search


Click here for example of binary search in Java

Comments