Bloomberg Interview Question

Find the longest substring