Exemplo n.º 1
0
        public static void Test()
        {
            LinkedDeque <int> d = new LinkedDeque <int>();

            d.PushBack(1);
            d.PushBack(2);
            d.PushFront(10);
            d.PushFront(8);
            Console.WriteLine(d.PopBack());
            Console.WriteLine(d.PopBack());

            Console.WriteLine(d.PopFront());
            Console.WriteLine(d.PopBack());



            LinkedDeque <int> ad = new LinkedDeque <int>();

            ad.PushBack(1);
            ad.PushFront(90);
            ad.PushFront(20);
            Console.WriteLine(ad.PopBack());
            Console.WriteLine(ad.PopBack());
            Console.WriteLine(ad.PopBack());
            ad.PushFront(3131);
            ad.PushFront(5235);
            ad.PushBack(75675);
            ad.PushFront(34534);
            Console.WriteLine(ad.PopFront());
            Console.WriteLine(ad.PopFront());
            Console.WriteLine(ad.PopBack());
            Console.WriteLine(ad.PopBack());
        }
Exemplo n.º 2
0
        public static void Test()
        {
            LinkedDeque <int> d = new LinkedDeque <int>();

            d.PushBack(1);
            d.PushBack(2);
            d.PushFront(10);
            d.PushFront(8);
            Console.WriteLine(d.PopBack());
            Console.WriteLine(d.PopBack());

            Console.WriteLine(d.PopFront());
            Console.WriteLine(d.PopBack());
        }