Exemple #1
0
 public void SetNext(LLNode n)   //set address of next node in current node
 {
     this.next = n;
 }
Exemple #2
0
 //constructors
 public LLNode(int data, LLNode next)
 {
     this.next = next;
     this.data = data;
 }
Exemple #3
0
 public void Enqueue(LLNode back)            //put node in the last position of linked list
 {
     this.list.SetBack(back);
 }
Exemple #4
0
 public void SetBack(LLNode back)            //set back node
 {
     this.back.SetNext(back);
     this.back = back;
 }
Exemple #5
0
 public void SetFront(LLNode newFront)       //set front node
 {
     this.front = newFront;
 }
Exemple #6
0
 public LinkedList(int f, int b)
 {
     this.back  = new LLNode(b);
     this.front = new LLNode(f, this.back);
 }