示例#1
0
        static void Main(string[] args)
        {
            ArrayStack arrStk = new ArrayStack();
            //arrStk.Push(5);
            //arrStk.Push(10);
            //arrStk.Push(15);
            //arrStk.Push(20);
            //arrStk.Push(25);
            //arrStk.Push(30);
            //arrStk.Push(35);
            //arrStk.Print();
            //arrStk.Pop();
            //arrStk.Print();
            //arrStk.Pop();
            //arrStk.Print();

            //Dictionary<string, int> minMaxDict = new Dictionary<string, int>();
            //arrStk.MinMaxStack(5, minMaxDict);
            //arrStk.MinMaxStack(7, minMaxDict);
            //arrStk.MinMaxStack(0, minMaxDict);
            //arrStk.MinMaxStack(11, minMaxDict);
            //arrStk.MinMaxStack(9, minMaxDict);
            //arrStk.MinMaxStack(-5, minMaxDict);
            //List<int> arr =  arrStk.MinMaxStack(2, minMaxDict);
            //arrStk.Peek();


            //foreach(int x in arr)
            //{
            //    Console.WriteLine(x);
            //    Console.WriteLine();
            //}

            Boolean isBrack = arrStk.CheckBrackets("([{}]{)");

            Console.WriteLine(isBrack);

            ExtendedStack es = new ExtendedStack();

            es.PushToExtendedStack(10);
            es.PushToExtendedStack(5);
            es.PushToExtendedStack(7);
            es.PushToExtendedStack(25);
            es.PushToExtendedStack(3);
            es.PushToExtendedStack(12);
            Console.WriteLine(es.GetMin());

            Console.Read();
        }