Computer Science, asked by shreyasce18, 6 months ago

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 akshara416
1

Answer:

(d)100

Explanation:

if it is correct please give like

Answered by vinod04jangid
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