예제 #1
0
        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);
        }
예제 #2
0
 private void RunTests(IKthToLastAnalyzer <int> kthToLastAnalyzer)
 {
     KthToLastTest(kthToLastAnalyzer);
 }