import java.util.*; //思路:用一个大顶堆,保存当前滑动窗口中的数据。滑动窗口每次移动一格,就将前面一个数出堆,后面一个数入堆。 public class Solution { public PriorityQueue<Integer> maxQueue = new PriorityQueue<Integer>((o1,o2)->o2-o1);//大顶堆 public ArrayList<Integer> result = new ArrayList<Integer>();//保存结果 publi...