Question: Given 2 different strings, please write a program lcs (str 1, str2) to find the longest common subsequence (LCS). For examples:+- LCS for input Sequences

Given 2 different strings, please write a program lcs (str 1, str2) to find the longest common subsequence (LCS). For examples:+- LCS for input Sequences "ABCDGH" and "AEDFHR" is"ADH" of length 3. LCS for input Sequences"AGGTAB" and "GXTXAYB" is "GTAB" oflength 4.+ IS ! Use C, C++ or Java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
