Question d’entretien chez Amazon

Return k largest and k smallest elements from given list.