In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is (GATE CS 2002)
(A) log 2 n
(C) log 2 n – 1
Explanation: In the worst case, the element to be searched has to be compared with all elements of linked list.
Quiz of this Question