Ejemplo n.º 1
0
        public static void Run()
        {
            var result = LinkedListUtillities.GenerateSinglyLinkedListFromArray(new int[] { 1, 1, 2, 3, 5, 2, 4 });

            LinkedListUtillities.PrintSLL(result);
            Console.WriteLine();
            LinkedListUtillities.PrintSLL(RemoveDups.RemoveDuplicates(result));
        }
Ejemplo n.º 2
0
        public static void Run()
        {
            var list1 = LinkedListUtillities.GenerateSinglyLinkedListFromArray(new int[] { 2, 4, 3 });
            var list2 = LinkedListUtillities.GenerateSinglyLinkedListFromArray(new int[] { 5, 6, 4 });

            LinkedListUtillities.PrintSLL(AddTwoNumbers.Add(list1, list2));
            Console.WriteLine();
        }
        public static void Run()
        {
            var result = LinkedListUtillities.GenerateSinglyLinkedListFromArray(new int[] { 1, 2, 3, 4, 5, 6, 7, 8 });

            LinkedListUtillities.PrintSLL(result);
            Console.WriteLine();
            LinkedListUtillities.PrintSLL(ReverseSubList.Reverse(result, 3, 6));
        }
        public static void Run()
        {
            var result = LinkedListUtillities.GenerateSinglyLinkedListFromArray(
                new int[] { 1, 1, 2, 3, 5, 2, 4, 7, 8 });

            LinkedListUtillities.PrintSLL(result);
            Console.WriteLine();
            //LinkedListUtillities.PrintSLL(RemoveDups.RemoveDuplicates(result));
            LinkedListUtillities.PrintSLL(DeleteMnodesAfterEveryNnodes.Delete(result, 5, 2));
            //Console.WriteLine(LinkedListCycle.IsCyclePresent2(result));
        }
        public static void Run()
        {
            var result = LinkedListUtillities.GenerateSinglyLinkedListFromArray(new int[] { 1, 1, 2, 3, 5, 2, 4 });

            LinkedListUtillities.PrintSLL(result);
            Console.WriteLine();
            var result2 = SplitLinkedList.Split(result);

            LinkedListUtillities.PrintSLL(result2[0]);
            Console.WriteLine();
            LinkedListUtillities.PrintSLL(result2[1]);
        }