Esempio n. 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);
        }
Esempio n. 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);
        }