Implement or optimize a function to find the k-th largest element in an unsorted array.

Technical