If i >= K , then decrement arr [ i - K ] element 's one  occurence
if ( i >= K ) : NEW_LINE INDENT if ( arr [ i - K ] in mp ) : NEW_LINE INDENT mp [ arr [ i - K ] ] -= 1 NEW_LINE sum -= arr [ i - K ] NEW_LINE DEDENT DEDENT