Pergunta de entrevista da empresa T-Systems

write a method that filters an array and returns only N first elements