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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started