Pergunta de entrevista da empresa Phenom

split the string such that each character comes only once in a splitted string