count frequency of each sum obtained from the pairs of arr1 [ ] and arr2 [ ] and store them in ' um '
for ( int i = 0 ; i < n ; i ++ ) for ( int j = 0 ; j < n ; j ++ ) if ( m . ContainsKey ( arr1 [ i ] + arr2 [ j ] ) ) { var val = m [ arr1 [ i ] + arr2 [ j ] ] ; m . Remove ( arr1 [ i ] + arr2 [ j ] ) ; m . Add ( ( arr1 [ i ] + arr2 [ j ] ) , val + 1 ) ; } else m . Add ( ( arr1 [ i ] + arr2 [ j ] ) , 1 ) ;