Traverse through all pairs and search for X - ( current pair summ ) .
for i in range ( n - 1 ) : NEW_LINE INDENT for j in range ( i + 1 , n ) : NEW_LINE INDENT summ = arr [ i ] + arr [ j ] NEW_LINE DEDENT DEDENT