예제 #1
0
        public void Push(object current)
        {
            Node temp = new Node();

            temp.SetData(current);
            temp.SetNext(top);
            top = temp;
        }
예제 #2
0
        public void Enqueue(object current)
        {
            Node temp = new Node();

            temp.SetData(current);

            if (last == null)
            {
                first = temp;
                last  = first;
            }
            else
            {
                last.SetNext(temp);
            }
            size++;
        }