Pregunta de entrevista de Salesforce

Maximum substring from given substring containing all different characters