Pregunta de entrevista de Cognizant

Write a program to print duplicate words from array?