j < i used to keep track whether jth element is inside or outside the window
while ( minarr [ j ] <= i + y - 1 or j < i ) : NEW_LINE INDENT j += 1 NEW_LINE DEDENT submin . append ( arr [ j ] ) NEW_LINE