You are viewing a single comment's thread. Return to all comments →
def miniMaxSum(arr): arr.sort() mini = arr[:-1] maxi = arr[1::] mini_sum = 0 maxi_sum = 0 for i in mini: mini_sum += i for i in maxi: maxi_sum += i print(mini_sum, maxi_sum)
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 →