In a singly linked list, what does each node contain?
Correct answer C. Data and a pointer to the next node
Explanation
A singly linked list node holds a data field and one link to the following node; the last node's link is null. Keeping a pointer to the previous node as well is what makes a list doubly linked. Nodes do not store indices, which is why reaching the k-th node requires walking from the head rather than jumping straight to it.
Answer checked How we write and check questions
Discussion