Paycor Interview Question

Make program to get duplicate words in array