Example #1
0
        public static void Main(string[] args)
        {
            StackClass stack = new StackClass();

            stack.push (1);
            stack.push (2);
            stack.pop();
            stack.push (4);

            QueueClass queue = new QueueClass();

            queue.enqueue (1);
            queue.enqueue (2);
            queue.enqueue (4);
            queue.dequeue();
            queue.enqueue (3);
        }
Example #2
0
        public static void Main(string[] args)
        {
            StackClass stack = new StackClass();

            stack.push(1);
            stack.push(2);
            stack.pop();
            stack.push(4);

            QueueClass queue = new QueueClass();

            queue.enqueue(1);
            queue.enqueue(2);
            queue.enqueue(4);
            queue.dequeue();
            queue.enqueue(3);
        }