In Binary Search , which will be the scenario for Average Case performance ?
A. The 'Mid key’ is present, but it’s not the middle element O(logn).
B. The ‘input key’ is present, but it’s not the middle element O(logn).
C. The ‘Last key’ is present, but it’s not the middle element O(logn).
D. The ‘First key’ is present, but it’s not the middle element O(logn).
Answers
Answered by
2
Answer:
The 'input key' is present, but it's not the middle element O(log ).
Explanation:
In binary search, there is an array containing multiple set of numbers.
These numbers are sorted in ascending or descending order and the algorithm states that when any numbered is provided for searching it in the array, then the array is divided into two halves.
After the array is divided, then it continues it's same algorithm to finally decide that whether the number is there or not.
In this search, the average case scenario is when the 'First key' is present, but it's not the middle element O(log n) .
Explanation:
ello xd
gud noon kese ho (≧▽≦)
Answered by
2
Answer:
the first key is present but it's not the middle element 0( long)
Similar questions