Solve KthLargestElement.