Пример #1
0
        static void Main(string[] args)
        {
            CreateLinkedList();
            Console.WriteLine("******* Linked List **********");
            LinkedList.DisplayLinkedListItems(LinkedList.Head);

            //LinkedList.ReverseLinkedListIterative();
            //Console.WriteLine("******* Linked List After Iterative Reversal **********");
            //LinkedList.DisplayLinkedListItems(LinkedList.Head);

            //LinkedList.Head = LinkedList.ReverseLinkedListRecursive(LinkedList.Head);
            //Console.WriteLine("******* Linked List After Recursive Reversal **********");
            //LinkedList.DisplayLinkedListItems(LinkedList.Head);

            //LinkedList.Head = LinkedList.ReverseLinkedListSwapping(LinkedList.Head);
            //Console.WriteLine("******* Linked List After Swapping Reversal **********");
            //LinkedList.DisplayLinkedListItems(LinkedList.Head);

            //LinkedList.PrintKthFromLastElement(LinkedList.Head, 2);

            //Console.WriteLine(LinkedList.IsLinkedListPalindrome(LinkedList.Head));

            LinkedList.DeleteDuplicates(LinkedList.Head);
            Console.WriteLine("******* Linked List After Deleting Duplicates **********");
            LinkedList.DisplayLinkedListItems(LinkedList.Head);

            Console.Read();
        }