Question d’entretien chez Paycom

Reverse a given string. Duplicates in a array