Mini-Max Sum

  • + 0 comments

    python - why is this failing test 4?

    total = sum(arr)
    min = total
    max = 0
    
    for x in arr:
    		if (total - x) > max:
    				max = total - x
    		elif (total - x) < min:
    				min = total - x
    
    print(f"{min} {max}")
    

    why is this failing test 4? undefined