private void KthToLastTest(IKthToLastAnalyzer <int> kthToLastAnalyzer) { int length = 2000000; int k = 1500000; int expected = 1; Node <int> head = CreateList(length, k); Node <int> result = kthToLastAnalyzer.GetKthToLastNode(head, k); Assert.AreEqual(expected, result.Data); }
private void RunTests(IKthToLastAnalyzer <int> kthToLastAnalyzer) { KthToLastTest(kthToLastAnalyzer); }