Pergunta de entrevista da empresa Booking.com

Write a function to find elements that repeat a given N times in a given L list. The array is not numbers and we are comparing references of objects.