Python stupid solution


  • 0
    class Solution(object):
        def maximumProduct(self, nums):
            a=sorted(nums, reverse = True)
            p1,p2,p3=a[0],a[1],a[2]
            a.reverse()
            return max(p1*p2*p3 , p1*a[0]*a[1])
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.