If i >= K , then decrement arr [ i - K ] element 's one  occurence
if ( i >= K ) { if ( mp . ContainsKey ( arr [ i - K ] ) ) mp [ arr [ i - K ] ] -= 1 ; else mp [ arr [ i - K ] ] = 1 ; sum -= arr [ i - K ] ;