You are viewing a single comment's thread. Return to all comments →
def miniMaxSum(arr): s=0 m=0 arr.sort() for i in range(1,len(arr)): s=s+arr[i] for i in range(0,len(arr)-1): m=m+arr[i] print(m,s)
Seems like cookies are disabled on this browser, please enable them to open this website
Mini-Max Sum
You are viewing a single comment's thread. Return to all comments →
def miniMaxSum(arr): s=0 m=0 arr.sort() for i in range(1,len(arr)): s=s+arr[i] for i in range(0,len(arr)-1): m=m+arr[i]
print(m,s)