Finished find longest common string problem.