In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is-
- A.log(2*n)
- B.n/2
- C.n
- D.log(2*n) - 1
Show answer
Answer: C. n
In the worst case, all n nodes must be traversed.
Answer: C. n
In the worst case, all n nodes must be traversed.