static void RunLinkedList() { Node head = null; var testsAmount = Int32.Parse(Console.ReadLine()); var coderInThirtyDays = new CoderInThirtyDays(); while (testsAmount-- > 0) { var data = Int32.Parse(Console.ReadLine()); head = coderInThirtyDays.InsertNodeToLinkedList(head, data); } coderInThirtyDays.DisplayLinkedList(head); }
static void RunMoreLinkedLists() { Node head = null; var nodesAmount = Int32.Parse(Console.ReadLine()); var coderInThirtyDays = new CoderInThirtyDays(); while (nodesAmount-- > 0) { var data = Int32.Parse(Console.ReadLine()); head = coderInThirtyDays.InsertNodeToLinkedList(head, data); } head = coderInThirtyDays.RemoveDuplicatesInLinkedList(head); coderInThirtyDays.DisplayLinkedList(head); }