Exemple #1
0
        public data getElement()
        {
            data element             = first.key;
            ConcatenateListNode temp = first;

            first     = first.next;
            temp.next = null;
            return(element);
        }
Exemple #2
0
        public void printList()
        {
            ConcatenateListNode L = first;

            while (L != null)
            {
                Console.Write("\n" + L.key.pKey);
                L = L.next;
            }
        }
Exemple #3
0
        public void Insert(data key)
        {
            ConcatenateListNode node = new ConcatenateListNode(key, null);

            if (first == null)
            {
                first = node;
                last  = node;
            }
            else
            {
                last.next = node;
                last      = node;
            }
        }
Exemple #4
0
 public ConcatenateListNode(data key, ConcatenateListNode next)
 {
     this.key  = key;
     this.next = next;
 }
Exemple #5
0
 public ConcatenateList(ConcatenateListNode first,
                        ConcatenateListNode last)
 {
     this.first = first;
     this.last  = last;
 }