示例#1
0
        private static void DoTest(StreamReader sr)
        {
            string s1 = sr.ReadLine();

            string s2 = sr.ReadLine();

            int result = CommonChild.commonChild(s1, s2);

            Console.WriteLine(result);
            Console.WriteLine(s1);
            Console.WriteLine(s2);
            Console.WriteLine(CommonChild.lcsString(s1, s2));
        }
        public void MainFlow(string inputString, int expected)
        {
            var    input = new StringReader(inputString);
            string s1    = input.ReadLine();

            string s2 = input.ReadLine();

            var algor = new CommonChild();

            int result = algor.commonChild(s1, s2);

            Assert.AreEqual(expected, result);
        }
示例#3
0
        private static void Main()
        {
            /* Current Problem */
            LongestPalindromicSubString.Execute();

            var obj = new LruCacheTest();

            obj.TestCache();

            CountTriplets.Execute();
            StairwayToHeaven2.Execute();
            Abbreviation.Execute();
            CommonChild.Execute();
            SpecialStringAgain.Execute();

            /* To-Do and Refactorings */
            Todo();
            Refactor();
            Console.ReadKey();
        }