Just 5 python Lines!


#1

class Solution:

def solve(self, A):
    A.sort()
    lastElem=len(A)-1
    return A[0]+A[lastElem]