human
Find pairs in array whose sum does not exist in Array | Function to print all pairs with sum not present in the array.
Corner Case.
Stores the distinct array elements.
Generate all possible pairs.
Calculate sum of current pair.
Check if the sum exists in the HashSet or not.
Driver Code"
Solution in Python:
assistant
#Here is code to find pairs in array whose sum does not exist in Array and the other steps required.
 def findPair ( arr , n ) :
	if ( n < 2 ) :
		print ( " - 1" )
	hashMap = [ ]
	for k in arr :
		hashMap . append ( k )
	for i in range ( n - 1 ) :
		for j in range ( i + 1 , n ) :
			sum = arr [ i ] + arr [ j ]
			if sum not in hashMap :
				print ( " ( " , arr [ i ] , " , ▁ " , arr [ j ] , " ) " )
if __name__ == " _ _ main _ _ " :
	arr = [ 2 , 4 , 2 , 6 ]
	n = len ( arr )
	findPair ( arr , n )