public void Test3() { var linkedList = new LinkedList(); Node repeatNode = new Node(null, 7); linkedList.AppendLinkedList(new Node(null, 1)); var result = Class43.FindCycleStart(linkedList); Assert.Null(result); }
public void Test2() { int expected = 7; var linkedList = new LinkedList(); Node repeatNode = new Node(null, 7); linkedList.AppendLinkedList(new Node(null, 1)); linkedList.AppendLinkedList(repeatNode); linkedList.AppendLinkedList(new Node(repeatNode, 3)); var result = Class43.FindCycleStart(linkedList); Assert.Equal(expected, result.GetData()); }