A Double Ended Queue , Di that will store indexes of useful array elements for the current window of size k . The useful elements are all negative integers .
LinkedList < Integer > Di = new LinkedList < > ( ) ;