Last Updated :
12 Dec, 2018
The average case occurs in the Linear Search Algorithm when:
(A) The item to be searched is in some where middle of the Array
(B) The item to be searched is not in the array
(C) The item to be searched is in the last of the array
(D) The item to be searched is either in the last or not in the array
Answer: (A)
Explanation:
The average case occurs in the Linear Search Algorithm when the item to be searched is in some where middle of the Array.
The best case occurs in the Linear Search Algorithm when the item to be searched is in starting of the Array.
The worst case occurs in the Linear Search Algorithm when the item to be searched is in end of the Array.
So, option (A) is correct.
Quiz of this Question
Share your thoughts in the comments
Please Login to comment...