Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var a = "abcbat".ToCharArray();
            var b = "dcbeta".ToCharArray();

            var result    = LongestCommonSubsequence.Find(a, b);
            var backTrack = LongestCommonSubsequence.GetBackTrack(result, a, b, a.Length - 1, b.Length - 1);

            Console.WriteLine(backTrack);

            Console.WriteLine("Press any key...");
            Console.ReadKey();
        }
 public static string Compute(string x) => LongestCommonSubsequence.Compute(x, Reverse(x));