human
Give me a code to given two unsorted arrays , find all pairs whose sum is x and the other steps required given the following:
Given two unsorted arrays , find all pairs whose sum is x | Function to find all pairs in both arrays whose sum is equal to given value x.
Insert all elements of first array in a hash.
Subtract sum from second array elements one by one and check it 's present in  array first or not.
Driver code"
Solution in Python:
assistant
#Here is code to given two unsorted arrays , find all pairs whose sum is x and the other steps required.
 def findPairs ( arr1 , arr2 , n , m , x ) :
	s = set ( )
	for i in range ( 0 , n ) :
		s . add ( arr1 [ i ] )
	for j in range ( 0 , m ) :
		if ( ( x - arr2 [ j ] ) in s ) :
			print ( ( x - arr2 [ j ] ) , ' ' , arr2 [ j ] )
arr1 = [ 1 , 0 , - 4 , 7 , 6 , 4 ]
arr2 = [ 0 , 2 , 4 , - 3 , 2 , 1 ]
x = 8
n = len ( arr1 )
m = len ( arr2 )
findPairs ( arr1 , arr2 , n , m , x )