Exemplo n.º 1
0
            public static void Main()
            {
                RemoveDuplicate <int> sList = new RemoveDuplicate <int>();

                sList.addNode(1);
                sList.addNode(2);
                sList.addNode(3);
                sList.addNode(2);
                sList.addNode(2);
                sList.addNode(4);
                sList.addNode(1);

                Console.WriteLine("Originals list: ");
                sList.display();

                sList.removeDuplicate();

                Console.WriteLine("List after removing duplicates: ");
                sList.display();
            }