Question: Help to Write python code for finding the longest common subsequence from two strings. Name the function LCS. The function does not take any take
Help to Write python code for finding the longest common subsequence from two strings. Name the function LCS.
The function does not take any take any parameters and instead reads strings from two files named "string1.txt" and "string2.txt".
The text files only contain the string without any separators or special characters.
The function returns the following as a list: [Length of longest subsequence, Subsequence]
The first element of the list is an integer and the second is a string.
Make sure that the name of the function, files and the format of the returned data is exactly as it is given.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
