public static void Test() { var head = AssortedMethods.randomLinkedList(5, 1, 20); Console.WriteLine("Original=" + head.printForward()); head = Reverse(head); Console.WriteLine("Reversed=" + head.printForward()); var head2 = AssortedMethods.randomLinkedList(5, 1, 20); head2 = ReverseDDL(head2); }
public static void Test() { var n = AssortedMethods.randomLinkedList(100, 0, 10); Console.WriteLine("Original = " + n.printForward()); DeleteDuplicates(n); Console.WriteLine("deDuped = " + n.printForward()); n = AssortedMethods.randomLinkedList(100, 0, 10); Console.WriteLine("Original = " + n.printForward()); DeleteDupsNoMemory(n); Console.WriteLine("deDuped = " + n.printForward()); }