Paycom interview question

Reverse a given string. Duplicates in a array