Pergunta de entrevista da empresa Standard Chartered Bank

Reverse array and find duplicate elements in array.