Question:codility Lesson6 MaxProductOfThree
My Answer:
def solution(A):
A.sort()
return max(A[0] * A[1] * A[-1],A[-1] * A[-2] * A[-3])
Question:codility Lesson6 MaxProductOfThree
My Answer:
def solution(A):
A.sort()
return max(A[0] * A[1] * A[-1],A[-1] * A[-2] * A[-3])