Which one of the following can be termed as worst case for linear search?
Element to be searched is present somewhere in the middle of the array.
Element to be searched is present at 0th index of the array.
Element to be searched is present at the last index of the array.
Element to be searched is present at the last index of the array or Element to be searched is not present in the array.
Answers
Answered by
0
As linear search starts from 0th index and goes upto last index, checking one by one so if the element to be searched is present in the last index or the element is not found at all then it will be the worst case for linear search
Answered by
1
Explanation:
Hope that the answer helps you.
Attachments:
Similar questions
Math,
7 months ago
Chemistry,
7 months ago
Chemistry,
7 months ago
English,
1 year ago
Environmental Sciences,
1 year ago
India Languages,
1 year ago
Geography,
1 year ago