Amazon interview question

Remove the longest substring in a string.