Amazon interview question

find the k th largest element in an array optimal solution