Given 2 strings of length n and m. You have to find the length of the longest common substring.
Answers
Answered by
0
Answer:
Let m and n be the lengths of first and second strings respectively. Dynamic Programming can be used to find the longest common substring in O(m*n) time. The idea is to find length of the longest common suffix for all substrings of both strings and store these lengths in a table..............
Similar questions
Science,
5 months ago
Math,
5 months ago
Biology,
5 months ago
Computer Science,
10 months ago
Computer Science,
10 months ago
Math,
1 year ago
Economy,
1 year ago
Physics,
1 year ago