Analysis of the Longest Common Substring Algorithm