Vidyalelo
Data Structure · Q178

Introduction to Data Structures

Programming · Data Structure · question 178

Q178

What is the time complexity to count the number of elements in the linked list?

A.
O(1)
B.
O(n)
Answer
C.
O(logn)
D.
O(n2)

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board