Expedia Group interview question

print all the duplicates in an array