LinkedList?

indianj

Beta member
Messages
4
hi, i need some help understanding this code. what is the difference between these three LinkedList?

public class CircularLinkedList
{
Node head;
Node tail;

public CircularLinkedList()
{
Node n = new Node();
head = n;
tail = n;
}

public CircularLinkedList(Object obj)
{
Node n = new Node(obj);
head = n;
tail = n;
}
 
The code fragments here seem to be fragments, at best, of a class designed for a circular linked list. The term circular means that items are inserted between a head and a tail node that link to each other. In other words, the list has no meaningfull end, just two predesignated terminus nodes and everything between. I'd really like to help you understand this code, but it is too incomplete to go further into it. Instead, try the two links below for examples and explanations both. I hope they help :)

http://cslibrary.stanford.edu/103/

http://cslibrary.stanford.edu/105/
 
Back
Top Bottom