public static int[] find(int[] arr, int windowSize, boolean print) {
		if(arr==null || arr.length==0) {
			return new int[]{};
		}
			
		int[] result = new int[arr.length];
		int idx = 0;
		MyQueueWithMaxMin<Integer> queue = new MyQueueWithMaxMin<Integer>(arr.length);
		int i=0;
		queue.offer(arr[i++]);
		if(i<arr.length) queue.offer(arr[i++]);
		if(i<arr.length) queue.offer(arr[i++]);
		result[idx++] = queue.max();
		for(; i<arr.length; i++) {
			queue.offer(arr[i]);
			queue.poll();
			result[idx++] = queue.max();
		}

		result = Arrays.copyOfRange(result, 0, idx);
		if(print) System.out.println(Arrays.toString(result));
		return result;	
	}