Search in a sorted array by using Binary search

Binary search algorithm is used to find a value in a sorted array in O(log n) time complexity by dividing the array in two halves and comparing middle value.