Skip to content
Related Articles

Related Articles

Data Structures | Linked List | Question 9
  • Difficulty Level : Basic
  • Last Updated : 20 Feb, 2013

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
(B) n/2
(C) log 2 n – 1
(D) n

Answer: (D)

Explanation: In the worst case, the element to be searched has to be compared with all elements of linked list.

Quiz of this Question

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :