human
Minimize the sum of product of two arrays with permutations allowed | Returns minimum sum of product of two arrays with permutations allowed.
Sort A and B so that minimum and maximum value can easily be fetched ..
Multiplying minimum value of A and maximum value of B.
Driven Program"
Solution in Python:
assistant
#Here is code to minimize the sum of product of two arrays with permutations allowed and the other steps required.
 def minValue ( A , B , n ) :
	A . sort ( )
	B . sort ( )
	result = 0
	for i in range ( n ) :
		result += ( A [ i ] * B [ n - i - 1 ] )
	return result
A = [ 3 , 1 , 1 ]
B = [ 6 , 5 , 4 ]
n = len ( A )
print minValue ( A , B , n )