MSCI interview question

find longest common substring in given string