@@ -0,0 +1,884 @@
+/**%0A * Problem: https://leetcode.com/problems/sliding-window-maximum/%0A * %0A * Using Deque with Queue implementation.%0A */%0A%0Apublic class Solution %7B%0A    public int%5B%5D maxSlidingWindow(int%5B%5D nums, int w) %7B%0A        if(nums.length == 0 %7C%7C w == 0) return nums;%0A        %0A        int%5B%5D ret = new int%5Bnums.length - w + 1%5D;%0A        Deque%3CInteger%3E q = new LinkedList%3CInteger%3E();%0A        for(int i=0; i%3Cw; i++) %7B%0A            while(!q.isEmpty() && nums%5Bq.getLast()%5D %3C nums%5Bi%5D) q.removeLast();%0A            q.addLast(i);%0A        %7D%0A        %0A        for(int i=w; i%3Cnums.length; i++) %7B%0A            ret%5Bi-w%5D = nums%5Bq.getFirst()%5D;%0A            while(!q.isEmpty() && nums%5Bq.getLast()%5D %3C nums%5Bi%5D) q.removeLast();%0A            while(!q.isEmpty() && q.getFirst() %3C= i-w ) q.removeFirst();%0A            q.addLast(i);%0A        %7D%0A        ret%5Bnums.length - w%5D = nums%5Bq.getFirst()%5D;%0A        %0A        return ret;%0A    %7D%0A%7D%0A

Create Sliding_Window_Maximum.java