The worst case occur in linear search algorithm when
Answers
Answered by
8
For a list with n items, the best case is when the value is equal to the first element of the list, in which case only one comparison is needed. The worst case is when the value is not in the list (or occurs only once at the end of the list), in which case n comparisons are needed.
⚡Hope it will help you.⚡
Similar questions
History,
6 months ago
Math,
6 months ago
Business Studies,
6 months ago
Physics,
11 months ago
Math,
1 year ago