Salesforce Interview Question

Maximum substring from given substring containing all different characters