Data Structures | Linked List | Question 13

Last Updated :
Discuss
Comments

What are the time complexities of finding 8th element from beginning and 8th element from end in a singly linked list? Let n be the number of nodes in linked list, you may assume that n > 8.

O(1) and O(n)

O(1) and O(1)

O(n) and O(1)

O(n) and O(n)

Share your thoughts in the comments