方法一 最大堆 建立一个最大堆,把数据存进去,堆顶元素是最大的;poll() k个数,最后一次poll出来的就是第K大的数。 import java.util.*; public class Solution { public int findKth(int[] a, int n, int K) { // write code here if (n < K) return -1; PriorityQueue<Integer> maxHeap = new PriorityQueue<>((e1, e2) -> { return e2 - e1; });//大顶...