Esempio n. 1
0
        static void Main(string[] args)
        {
            List             myList = new List();
            StackRepetitions MyStackOfRepetitions = new StackRepetitions();
            StackUnique      MyStackOfUniques     = new StackUnique();
            Random           randomNumber         = new Random();


            for (int i = 0; i < 10; i++)
            {
                myList.InsertIntoBeginning(randomNumber.Next(1, 20));
            }

            Console.WriteLine("----------------------------");
            Console.WriteLine("My list: ");
            myList.ShowList();
            Console.ReadKey();


            myList.FindDuplicateNumbers(MyStackOfRepetitions, MyStackOfUniques);

            Console.WriteLine("\n----------------------------");
            Console.WriteLine("My stack of repetitions: ");
            MyStackOfRepetitions.ShowStack();
            Console.ReadKey();

            Console.WriteLine("----------------------------");
            Console.WriteLine("My stack of unique values: ");
            MyStackOfUniques.ShowStack();
            Console.ReadKey();
        }