wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

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

A
O(n)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
O(1)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
O(log n)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
None of the mentioned
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Join BYJU'S Learning Program
CrossIcon