• + 0 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)