HomeX interview question

Longest string that is substring of given string