Longest Common Substring(LintCode 79):

Problem