Incrementing the frequency of sum encountered
if ( arr [ i ] + arr [ N - i - 1 ] not in sum_equal_to_x ) : NEW_LINE INDENT sum_equal_to_x [ arr [ i ] + arr [ N - i - 1 ] ] = 0 NEW_LINE DEDENT sum_equal_to_x [ arr [ i ] + arr [ N - i - 1 ] ] += 1 NEW_LINE