Computer Science, asked by dhruvshadilya3876, 10 months ago

What is the worst case of serial search for finding the single element in a linked list?

Answers

Answered by AskewTronics
4

O(n) is the answer for the above question.

Explanation:

  • Serial search is an algorithim which is used for searching the element from the list. It is also known as sequential search or linear search.
  • This search algorithim is used to scan the element of the list one by one and match with the searching items. If the match found it result true otherwize it continue the search, untill the elemnt of the list is left.
  • The worst case scenrio states that the search elemnt is not found after scanned the whole element of the list.
  • So for the worst case, it is necessary to search the all element. If the size of the list is n. then the algorithim excutes n times.
  • So the running time of the algorithim for the worst case is O(n), where n is the size of the list.

Learn more:

  • Worst case: https://brainly.in/question/1763367
Similar questions