dynamic programming-longest common substring