Bloomberg interview question

Find the longest substring