Algorithm
{
If then
Else return false.
If then
Return
Else if then
Return
Else
Return
End if
End if
}
array[mid] <= start index
s array of words frequencies of
This algorithm is constructed or take run time of .
Here, the analysis of algorithm is given below, binary search, only certain that there is no such value to the left of the middle element ifrole="math" localid="1659776120568" , where mid is index of middle element, and start index is the start of the array.And divide-and-conqueralgorithm is constructed with run time
Every fine we are dividing the array into half. i.e.,
If, next call will be,
Callbase case.
We are performing operations.
Hence, time complexity: