Ejemplo n.º 1
0
        public T deQueue()
        {
            if (s1.Count() == 0)
            {
                Console.WriteLine("Q is Empty");
            }


            T x = (T)s1.Peek();

            s1.Pop();
            return(x);
        }
Ejemplo n.º 2
0
        private static void BasicStackTest()
        {
            BasicStack <int> stack = new BasicStack <int>();

            stack.Push(10);
            stack.Push(20);
            stack.Push(30);
            stack.Push(40);
            //stack.PrintStack();
            stack.Peek();
            Console.WriteLine("Item popped from Stack : {0}", stack.Pop());
            //stack.PrintStack();
        }