Home »
MCQs »
Algorithms MCQs
In the LCS problem, if the last characters of the input strings are the same, the LCS length can be derived as 1 + LCS of ____.
38. In the LCS problem, if the last characters of the input strings are the same, the LCS length can be derived as 1 + LCS of ____.
- Remaining parts of both strings
- One string with the last character removed and the other string unchanged
- Both strings unchanged
- Remaining part of the first string and unchanged second string
Answer
The correct answer is: A) Remaining parts of both strings
Explanation
If the last characters are the same, we add 1 to the LCS length of the remaining parts of both strings.