...
Database-Management-System
October 13, 2023
GATE 2002
October 13, 2023
Database-Management-System
October 13, 2023
GATE 2002
October 13, 2023

GATE 2002

Question 5
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 n
B
n/2
C
(log2)n – 1
D
n
Question 5 Explanation: 
Worst case time complexity of singly linked list is O(n). So we need n number of comparisons needed to search a singly linked list of length n.
Correct Answer: D
Question 5 Explanation: 
Worst case time complexity of singly linked list is O(n). So we need n number of comparisons needed to search a singly linked list of length n.

Leave a Reply

Your email address will not be published. Required fields are marked *