Intel Corporation interview question

find longest substring