Agoda interview question

Find duplicates in array and print the results