Ejemplo n.º 1
0
        private static void AddNumbers()
        {
            LinkedListOperations linkedList = new LinkedListOperations();

            ListNode firstNumber  = linkedList.CreateNumberList(9);
            ListNode secondNumber = linkedList.CreateNumberList(9999999991);

            ListNode sum = linkedList.AddTwoNumbers(firstNumber, secondNumber);

            Console.WriteLine($"Sum : {linkedList.GetNumber(sum)}");
        }
Ejemplo n.º 2
0
        private static void GetIntersectionNode()
        {
            LinkedListOperations linkedList = new LinkedListOperations();

            ListNode firstNumber  = linkedList.CreateNumberList(3);
            ListNode secondNumber = linkedList.CreateNumberList(32);

            ListNode sum = linkedList.GetIntersectionNode(firstNumber, secondNumber);

            Console.WriteLine($"Sum : {linkedList.GetNumber(sum)}");
        }