Amazon interview question

Return k largest and k smallest elements from given list.