You are viewing a single comment's thread. Return to all comments →
Python
def miniMaxSum(arr): arr.sort() mini = 0 maxi = 0 for i,j in enumerate(arr): if i<len(arr)-1: mini += j if 0<i<len(arr): maxi += j print(mini, maxi)
minimax([4,5,1,3,9])
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 →
Python