Pergunta de entrevista da empresa Akamai

Based on permutation of character in an array