PayPal Interview Question

How to find the longest substring?