Binary Search in Java

Binary search is an optimized algorithm to perform searching operation. It follows Divide and Conquer approach for searching. Pre-condition of Binary search : To perform Binary search the array should be sorted in ascending or descending order. Logic of Binary Search Let us consider array is sorted in ascending order. Now we compare the element … Read more