public Integer[] getMaxInSlideWindow2(Integer[] A, Integer w) {
		if (A == null || w <= 0 || A.length - w + 1 <= 0)
			return null;
		Integer[] B = new Integer[A.length - w + 1];
		PriorityQueue<Integer> prQ = new PriorityQueue<Integer>();

		for (int i = 0; i < A.length; i++) {
			int data = A[i];
			prQ.add(-data); // add to the priority queue

			if (i < w - 1) {
				continue;
			}
			Integer max = -prQ.peek();
			B[i - w + 1] = max;
			prQ.remove(-A[i - w + 1]); // remove the queue
		}

		return B;
	}