http://en.wikipedia.org/wiki/Longest_common_substring_problem
Basically, given "abcba" and "abdba", the algorithm should return "ab" and "ba" as equally valid answers.
---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend