T-Systems Interview Question

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