Пример #1
0
        public static void isPalindrome()
        {
            var number1 = new myLinkedList <int>
            {
                data = 1,
                Next = new myLinkedList <int>
                {
                    data = 2,
                    Next = new myLinkedList <int>
                    {
                        data = 3,
                        Next = new myLinkedList <int>
                        {
                            data = 2,
                            Next = new myLinkedList <int>
                            {
                                data = 1,
                            }
                        }
                    }
                }
            };
            var obj = new CareerCupQnA();

            Console.WriteLine(
                obj.CheckPalindromeInLinkedList(number1, new Dictionary <int, int>(), 0, 5));
        }