human
Product of maximum in first array and minimum in second | Function to calculate the product.
Sort the arrays to find the maximum and minimum elements in given arrays.
Return product of maximum and minimum ..
Driver Program"
How can the above be solved in Python?
assistant
#Here is code to product of maximum in first array and minimum in second and the other steps required.
 def minmaxProduct ( arr1 , arr2 , n1 , n2 ) :
	arr1 . sort ( )
	arr2 . sort ( )
	return arr1 [ n1 - 1 ] * arr2 [ 0 ]
arr1 = [ 10 , 2 , 3 , 6 , 4 , 1 ]
arr2 = [ 5 , 1 , 4 , 2 , 6 , 9 ]
n1 = len ( arr1 )
n2 = len ( arr2 )
print ( minmaxProduct ( arr1 , arr2 , n1 , n2 ) )