コード例 #1
0
		public static void Main (string[] args)
		{
			var testList = new LinkedList<int> ();
			testList.AddLast (1);
			testList.AddLast (2);
			testList.AddLast (2);
			testList.AddLast (3);
			testList.AddLast (3);
			testList.AddLast (3);
			testList.AddLast (4);
			testList.AddLast (1);
			testList.AddLast (4);

			var listhandler = new ListHandler ();
			//listhandler.deleteDups (testList.First);
			listhandler.deleteDupsNoBuffer (testList.First);
			foreach (int element in testList) {
				Console.WriteLine (element);
			}
				
				
		}
コード例 #2
0
        public static void Main(string[] args)
        {
            var testList = new LinkedList <int> ();

            testList.AddLast(1);
            testList.AddLast(2);
            testList.AddLast(2);
            testList.AddLast(3);
            testList.AddLast(3);
            testList.AddLast(3);
            testList.AddLast(4);
            testList.AddLast(1);
            testList.AddLast(4);

            var listhandler = new ListHandler();

            //listhandler.deleteDups (testList.First);
            listhandler.deleteDupsNoBuffer(testList.First);
            foreach (int element in testList)
            {
                Console.WriteLine(element);
            }
        }