Pregunta de entrevista de SAP

Determine longest consecutive substring in a string