You are viewing a single comment's thread. Return to all comments →
def miniMaxSum(arr): mi = ma = sum(arr[1:]) for index in range(1, 5): current_sum = sum(arr[0:index] + arr[index + 1:]) if current_sum < mi: mi = current_sum if current_sum > ma: ma = current_sum print(mi, ma)
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 →