Tuesday, January 10, 2012

Longest Common substring

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/

1 comment: