public void LoopStartHash_7154c52874_5() { SingleLinkedList <int> list = SingleLinkedList <int> .GenerateCyclic( new int[] { 7, 1, 5, 4 }, new int[] { 5, 2, 8, 7, 4 } ); var cycleStart = list.LoopStartHash(); Assert.AreEqual(5, cycleStart?.Value); }
public void ContainsLoopHash_7154c52874_true() { SingleLinkedList <int> list = SingleLinkedList <int> .GenerateCyclic( new int[] { 7, 1, 5, 4 }, new int[] { 5, 2, 8, 7, 4 } ); var cyclic = list.ContainsLoopHashSet(); Assert.IsTrue(cyclic); }