[LintCode] Longest Common Substring