Paycom Interview Question

Reverse a given string. Duplicates in a array