In the worst case number of comparisons needed to search an item stored in single linked list structure of length 100 is
a. 0
b. 1
c. 99
d. 100
Answers
Answered by
1
Answer:
(d)100
Explanation:
if it is correct please give like
Answered by
0
Answer:
d. 100
Explanation:
A Linked list is a data structure in which elements are stored in a linear fashion. Each element of the list is known as node. Each node in the list contains two fields. One of the field contains data whereas the second field contains address of the next node.
The worst case to search an item appears when either the data is present at the last node or the data is not present in the list. Either way all the elements of the list are compared to one another. Hence, in the worst case, number of comparisons made to search an item in a single linked list of length 100 is 100.
#SPJ2
Similar questions
English,
3 months ago
Math,
3 months ago
Physics,
3 months ago
English,
7 months ago
Math,
7 months ago
Computer Science,
11 months ago
Social Sciences,
11 months ago