Given two strings, S of length m and T of length n, find the longest strings which are substrings of both S and T.
The longest common substrings of the strings "ABAB", "BABA" and "ABBA" are the strings "AB" and "BA" of length 2. Other common substrings are "A", and "B".
http://algorithms.tutorialhorizon.com/dynamic-programming-longest-common-substring/
http://www.geeksforgeeks.org/longest-common-substring/
The longest common substrings of the strings "ABAB", "BABA" and "ABBA" are the strings "AB" and "BA" of length 2. Other common substrings are "A", and "B".
http://algorithms.tutorialhorizon.com/dynamic-programming-longest-common-substring/
http://www.geeksforgeeks.org/longest-common-substring/
This will not work for
ReplyDelete1 29 3
4 8 2
1 5 3