Question d’entretien chez PayPal

How to find the longest substring?