示例#1
0
        public void Push(int value)
        {
            var cvalue = new no(value);

            if (Head == null)
            {
                Head = cvalue;
            }
            else
            {
                cvalue.next = Head;
                Head        = cvalue;
            }
            Count++;
        }
示例#2
0
        public void EnQueue(int value)
        {
            no cvalue = new no(value);

            if (Head == null)
            {
                Head = cvalue;
            }
            else
            {
                no cv = Head;
                while (cv.next != null)
                {
                    cv = cv.next;
                }
                cv.next = cvalue;
            }
            Count++;
        }
示例#3
0
 public no(int value)
 {
     this.value = value;
     this.next  = null;
 }