Answer:
Explanation:
The following code is written in Java and creates the recursive function to find the longest common substring as requested.
static int lengthOfLongestSubsequence(String X, String Y) {
int m = X.length();
int n = Y.length();
if (m == 0 || n == 0) {
return 0;
}
if (X.charAt(m - 1) == Y.charAt(n - 1)) {
return 1 + lengthOfLongestSubsequence(X, Y);
} else {
return Math.max(lengthOfLongestSubsequence(X, Y),
lengthOfLongestSubsequence(X, Y));
}
}
the answer to this is 2 and 3
Hope this helped
-scav
Answer:
Explanation:
Computer also facilitate comfort to our life and provides convenience. For transportation, it facilitate the way people travel. Airways, Roadways and waterways uses computers to control their operation. It saves time and relieve severity of traveling difficulties.