Practice mode Data Structures

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.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.