PEOL Interview Question

Write the code to find Longest substring. S