XYZ interview question

Longest substring in a string with duplicate characters.