My Python solution


  • 0
    S
    class Solution(object):
        def sortTransformedArray(self, nums, a, b, c):
            results = []
            for x in nums:
                results.append(a*(x**2) + b*x + c)
            return sorted(results)
            
    

Log in to reply
 

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