• + 0 comments

    Is it cheating if we sort first?

    def miniMaxSum(arr):
        arr.sort()
        print(sum(arr[0:4]), sum(arr[1:5]))