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
Math,
6 months ago
English,
6 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago
Economy,
1 year ago
Physics,
1 year ago