Exemplo n.º 1
0
 public void AddLast(DoublyNodeTest<T> doublyNode)
 {
     if (IsEmpty)
     {
         head = doublyNode;               
     }
     else
     {
         tail.next = doublyNode;
         doublyNode.prev = tail;                
     }
     tail = doublyNode;
     count++;
 }
Exemplo n.º 2
0
        public void AddFirst(DoublyNodeTest<T> doublyNode)
        {
            DoublyNodeTest<T> temp = head;
            head = doublyNode;
            head.next = temp;

            if (IsEmpty)
            {
                tail = head;
            }
            else
            {                
                temp.prev = head;
            }
            count++;
        }