Answer the question
In order to leave comments, you need to log in
How to describe the structure of a singly linked list in Java?
Hi everybody. Can you tell me how to describe the following singly linked list structure in Java?
{
"value": 1,
"next": {
"value": 2,
"next": {
"value": 3,
"next": {
"value": 4,
"next": null
}
}
}
}
Answer the question
In order to leave comments, you need to log in
So describe.
public class Node {
private int value;
private Node next;
// constructors-getters-setters here
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question