human
Minimize Cost with Replacement with other allowed | Function returns the minimum cost of the array.
Driver Code"
Solution in Python:
 Give me a code to minimize Cost with Replacement with other allowed and the other steps required?
assistant
#Here is code to minimize Cost with Replacement with other allowed and the other steps required.
 def getMinCost ( arr , n ) :
	min_ele = min ( arr )
	return min_ele * ( n - 1 )
arr = [ 4 , 2 , 5 ]
n = len ( arr )
print ( getMinCost ( arr , n ) )