PEOL interview question

Write the code to find Longest substring. S