private static LinkedList.Node CreateSortedList(int number, int?optionalstart = null) { LinkedList.Node newNode = null; int start = optionalstart != null ? optionalstart.Value : 0; number = start > 0 ? number + start : number; for (int i = start > 0 ? start : 0; i < number; i++) { newNode = LinkedList.Add(newNode, i); } return(newNode); }
private static LinkedList.Node CreateNode(int number) { Random rand = new Random(); LinkedList.Node newNode = LinkedList.Create(rand.Next(0, 10)); for (int i = 0; i < number; i++) { newNode = LinkedList.Add(newNode, rand.Next(1, 10)); } return(newNode); }