Computer Science, asked by 16uca003, 1 year ago

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 sidhant15
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 krishnadutta354
1

Explanation:

Hope that the answer helps you.

Attachments:
Similar questions