Database-Management-System
October 13, 2023GATE 2002
October 13, 2023Data-Structures
Question 40 |
In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is
log n | |
n/2 | |
(log2)n – 1 | |
n |
Question 40 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 40 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.
Subscribe
Login
0 Comments