Pergunta de entrevista da empresa Illumina

How would you search for the longest substring in a given string?