human
Minimum product of maximum and minimum element over all possible subarrays | Function to find the minimum product of the minimum and maximum among all the possible subarrays.
Stores resultant minimum product.
Traverse the given array arr [ ].
Min of product of all two pair of consecutive elements.
Return the resultant value.
Driver Code"
How can the above be solved in Python?

Write me a code to minimum product of maximum and minimum element over all possible subarrays and the other steps required?
assistant
#Here is code to minimum product of maximum and minimum element over all possible subarrays and the other steps required.
 def findMinMax ( a ) :
	min_val = 1000000000
	for i in range ( 1 , len ( a ) ) :
		min_val = min ( min_val , a [ i ] * a [ i - 1 ] )
	return min_val
if __name__ == ( " _ _ main _ _ " ) :
	arr = [ 6 , 4 , 5 , 6 , 2 , 4 , 1 ]
	print ( findMinMax ( arr ) )