예제 #1
0
        public void Test4()
        {
            string a = "AGGTAB";
            string b = "GXTXAYB";

            var lcs    = new LcsRecursive();
            var result = lcs.LCS(a, b, 0, 0);

            Console.WriteLine("Total call count: {0}", LcsRecursive.CallCount);

            Assert.That(result, Is.EqualTo(4));
        }
예제 #2
0
        public void Test5()
        {
            string a = "stone";
            string b = "longest";

            var lcs    = new LcsRecursive();
            var result = lcs.LCS(a, b, 0, 0);

            Console.WriteLine("Total call count: {0}", LcsRecursive.CallCount);
            var result2 = new LcsRecursive().LCS2(a, b);

            Assert.That(result, Is.EqualTo(3));
        }