Create Longest common subsequence using C++