Pergunta de entrevista da empresa Akamai

Given a substring determine the alphabetically maximum substring