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

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

            while (L != null)
            {
                Console.Write("\n" + L.key.pKey);
                L = L.next;
            }
        }
Example #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;
            }
        }
Example #4
0
 public ConcatenateListNode(data key, ConcatenateListNode next)
 {
     this.key  = key;
     this.next = next;
 }
Example #5
0
 public ConcatenateList(ConcatenateListNode first,
                        ConcatenateListNode last)
 {
     this.first = first;
     this.last  = last;
 }