Increment its frequency by 1 if it is already present in map . Otherwise , set its frequency to 1
else { if ( ! map . ContainsKey ( k - i ) ) map . Add ( k - i , 1 ) ; else map [ i ] = map [ i ] + 1 ; } }