1. Computer Science Engineering (CSE)
  2. Data Structures (DS)
  3. Linear Data Structures - List
  4. What is the time complexity to count the...
Q.

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

A. O(1)
B. O(n)
C. O(logn)
D. O(n2)
Answer» B. O(n)
View all MCQs in:   Data Structures (DS)

Discussion