Pergunta de entrevista da empresa Amazon

Return k largest and k smallest elements from given list.