← Linked List Quiz: all 8 questions
Linked List Quiz · Question 1 of 8
What is the time to access the k-th node of a singly linked list?
What is the time to access the k-th node of a singly linked list?
- A.O(1)
- B.O(k)
- C.O(log k)
- D.O(k²)
Answer & explanation
Correct answer: O(k)
There are no indexes — you must walk k nodes from the head.
Can you get the rest right without peeking?
Take the timed Linked List Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →