PayPal interview question

How to find the longest substring?