Worst case of serial search in finding single element in linked list
Answers
Answered by
0
Answer:
rxyltzk
Explanation:
Answered by
0
O(n) is the correct answer for the above question.
Explanation:
- The serial search of the algorithm read the element one by one and match the element with the searched item. If the match found it will print the item otherwise, it will proceed searching process further until the whole element of the list can not be searched.
- The worst-case specifies that the searched item can not be found and the whole list can be searched by the algorithm.
- If the size of the list is n, then the algorithm executes n times. So the running time of the algorithm is O(n) in the worst case.
Learn More:
- Worst case: brainly.in/question/1763367
Similar questions