comefrom: <gouthampradhan>heap_SlidingWindowMaximum_1.java
code: public int[] maxSlidingWindow(int[] nums, int k) {
      int[] result = new int[nums.length - (k - 1)];
      if (nums.length == 0) return new int[0];
      Deque<Integer> queue = new ArrayDeque<>();
      for (int i = 0, j = 0, l = nums.length; i < l; i++) {
        int head = i - (k - 1);
        if (head >= 0) {
          if (queue.peek() != null && queue.peek() < head) queue.poll();
        }
        while (queue.peekLast() != null && nums[queue.peekLast()] <= nums[i]) {
          queue.pollLast();
        }
        queue.offer(i);
        if (i >= k - 1) result[j++] = nums[queue.peek()];
      }
      return result;
    }
masked: public int [ ] sample_funcname ( int [ ] var_0 , int var_1 ) {
    int [ ] var_2 = new int [ var_0 . length - ( var_1 - 1 ) ] ;
    if ( var_0 . length == 0 ) return new int [ 0 ] ;
    Deque < Integer > var_3 = new ArrayDeque < > ( ) ;
    for ( int var_4 = 0 , var_5 = 0 , var_6 = var_0 . length ;
    var_4 < var_6 ;
    var_4 ++ ) {
      int var_7 = var_4 - ( var_1 - 1 ) ;
      if ( var_7 >= 0 ) {
        if ( var_3 . peek ( ) != null && var_3 . peek ( ) < var_7 ) var_3 . poll ( ) ;
      }
      while ( var_3 . peekLast ( ) != null && var_0 [ var_3 . peekLast ( ) ] <= var_0 [ var_4 ] ) {
        var_3 . pollLast ( ) ;
      }
      var_3 . offer ( var_4 ) ;
      if ( var_4 >= var_1 - 1 ) var_2 [ var_5 ++ ] = var_0 [ var_3 . peek ( ) ] ;
    }
    return var_2 ;
  }
  