The queue will store indexes of useful elements in every window In deque ' G ' we maintain decreasing order of values from front to rear In deque ' S ' we maintain increasing order of values from front to rear
List < int > S = new List < int > ( ) ; List < int > G = new List < int > ( ) ;